libglade学习笔记

1。自动连接handler name相同的信号和函数。

The some_signal_handler_func function is not referenced anywhere in the program explicitely, but if any signals are defined in the interface description that use "some_signal_handler_func" as the handler name, then this function will automatically be connected. 

 

2.如果想自动连接,编译的时候需要加"-export-dynamic"或"pkg-config --cflags --libs gmodule-export-2.0"

If you wish to autoconnect handlers defined in the main executable (not a shared library), you will need to pass a linker flag to export the executable's symbols for dynamic linking. This flag is platform specific, but libtool can take care of this for you. Just add -export-dynamic argument to your link flags, and libtool will convert it to the correct format.

The easiest way to get the correct extra flags is to check for gmodule-export-2.0 with pkg-config.

 

3.使用自动编译工具时的配置

The pkg-config program is used to deduce the compiler and link flags necessary to compile various modules. If you are using automake or autoconf, you probably want to use the PKG_CHECK_MODULES macro. This can be used to check for the presence of a collection of a number of packages, and set some shell variables:

PKG_CHECK_MODULES(MYPROG, libglade-2.0 libgnomeui-2.0 >= 1.110.0)
AC_SUBST(MYPROG_CFLAGS)
AC_SUBST(MYPROG_LIBS)

 

4.目前libglade支持三种module,只有使用libgnomeui需要调用gnome_program_init进行初始化操作。

Currently there are libglade module support for libbonoboui libgnomecanvas and libgnomeui. Note that libglade can also handle widgets that implement the properties interfaces with no extra code.While no additional libglade initialisation is required to use a module, however, the underlying library might need initialisation. For instance, to use libgnomeui widgets from libglade, you must call gnome_program_init beforehand.

 

5.libglade支持...

Libglade also supports disambiguating properties by prefixing them with a |-separated context string, e.g. "Menu/Printer|Open" vs. "Menu/File|Open". You must tell Libglade that the property has a prefix by setting the context attribute of the <property> element to "yes". To learn more about this technique, read the chapter "How to use gettext in GUI programs" in the gettext manual, and see the GLib API documentation for g_strip_context()。

 

 

 

 
 
 

转载于:https://www.cnblogs.com/niocai/archive/2011/11/29/2267647.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值