zoukankan      html  css  js  c++  java
  • 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()。

    
    
    
    
  • 相关阅读:
    从零开始学SQLSERVER-游标CURSOR(基础)
    从零开始学SQLSERVER-创建表
    从零开始学HTML-button
    从零开始学前端HTML-input标签
    专项测试实战 | 如何测试 App 流畅度(基于 FPS 和丢帧率)
    接口测试框架实战 | 流程封装与基于加密接口的测试用例设计
    软件测试之30分钟轻松搞定正则表达式基础
    Python 装饰器填坑指南 | 最常见的报错信息、原因和解决方案
    react16与react15之间的区别
    react-父子组件之间的交互传值
  • 原文地址:https://www.cnblogs.com/niocai/p/2267647.html
Copyright © 2011-2022 走看看