pygtk

   $pkg-config --modversion gtk+    (查看1.2.x版本)

     $pkg-config --modversion gtk+-2.0  (查看 2.x 版本)

     $pkg-config --version (查看pkg-config的版本)

     $pkg-config --list-all |grep gtk (查看是否安装了gtk)
    我输入pkg-config --modversion gtk+-2.0,提示找不到xproto.pc文件,需要把包含该文件的目录放到PKG_CONFIG_PATH里,搜索了一下,该文件在/usr/share/pkgconfig下,于是更改环境变量成:
     export PKG_CONFIG=/usr/local/bin/pkg-config
     export PKG_CONFIG_PATH=/usr/share/pkgconfig:/usr/lib/pkgconfig
GTK is essentially an object oriented application programmers interface (API). Although written completely in C, it is implemented using the idea of classes and callback functions (pointers to functions). There is also a third component called GLib which contains a few replacements for some standard calls, as well as some additional functions for handling linked lists, etc. The replacement functions are used to increase GTK’s portability, as some of the functions implemented here are not available or are nonstandard on other unixes such as g_strerror(). Some also contain enhancements to the libc versions, such as g_malloc that has enhanced debugging utilities. In version 2.0, GLib has picked up the type system which forms the foundation for GTK’s class hierarchy, the signal system which is used throughout GTK, a thread API which abstracts the different native thread APIs of the various platforms and a facility for loading modules. As the last component, GTK uses the Pango library for internationalized text output. This tutorial describes the Python interface to GTK+ and is based on the GTK+ 2.0 Tutorial written by Tony Gale and Ian Main. This tutorial attempts to document as much as possible of PyGTK, but is by no means complete. This tutorial assumes some understanding of Python, and how to create and run Python programs. If you are not familiar with Python, please read the Python Tutorial [http://www.python.org/doc/current/tut/tut.html] first. This tutorial does not assume an understanding of GTK; if you are learning PyGTK to learn GTK, please comment on how you found this tutorial, and what you had trouble with. This tutorial does not describe how to compile or install Python, GTK+ or PyGTK. This tutorial is based on: • GTK+ 2.0 through GTK+ 2.4 • Python 2.2 • PyGTK 2.0 through PyGTK 2.4
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值