Gtk+ 教程和資源集合

Gtk+ 教程和資源集合
http://gtk.awaysoft.com/read-gtk-tid-98.html

本貼以http://www.gtkforums.com/about988.html爲藍本整理並翻譯。

歡迎來到GTK+ 教程和資源
這個頁面收集了關於GTK+編程的一些資料(包括文檔、教程和實例),並非所有的內容都是講述GTK+的,但是,在這裏的資料都是與GTK+相關的。
注意:所有這些資料/教程都是使用c語言。

C Programming 2nd Edition
如果你需要學習C語言,這是一本經典的C語言教程。
[PDF] http://madison-project.wikidot.com/local--files/tutorials/The_C_Programming_Language.pdf

另外一個好的C語言教程網站
[Html] http://www.exforsys.com/tutorials/c-language/c-programming-an-overview.html

更多好的C語言教程
[Html] http://irc.essex.ac.uk/www.iota-six.co.uk/c/

學習GTK+你所需要的全部C語言知識
[Html] http://www.freesoftwaremagazine.com/articles/all_the_c_you_need_for_gtk_development
[Pdf] http://www.freesoftwaremagazine.com/node/2543/pdf

randu.org的簡單C語言教程
[HTML] http://randu.org/tutorials/c/index.php

C Reference Card (ANSI) "備註:需要一個更簡單的版本來代替"
[Pdf] http://users.ece.utexas.edu/~adnan/c-refcard.pdf

一個關於C語言指針和數珠的教程
[Html] http://pweb.netcom.com/~tjensen/ptr/pointers.htm
[Pdf] http://pweb.netcom.com/~tjensen/ptr/pointers.pdf

一個關於指針和內存的教程
[Pdf] http://cslibrary.stanford.edu/102/PointersAndMemory.pdf

如果你需要一個關於如何使用不同的C語言特性和函數的細節而直接的指針例子
[Html] http://www.java2s.com/Tutorial/C/CatalogC.htm
[Html] http://www.java2s.com/Code/C/CatalogC.htm

ISO/IEC 9989
[HTML] http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1124.pdf

Glibc 教程
使用POSIX Threads進行多線程編程
[Html] http://users.actcom.co.il/~choo/lupg/tutorials/multi-thread/multi-thread.html

Embedded Scripting
如何使用swig創建 C/Lua 模塊
[pdf] http://madison-project.wikidot.com/local--files/tutorials/C_Lua_Swig.pdf

Lua Swig 教程
[Html] http://www.swig.org/Doc1.3/Lua.html

如何使用Lua+C.
[Html] http://www.gtkforums.com/viewtopic.php?t=1995

如何使用Python+C
[HTML] http://www.gtkforums.com/viewtopic.php?p=9055#9055

如何通過C語言使用 Spidermonkey 嵌入式 javascript引擎
[HTML] https://developer.mozilla.org/en/JavaScript_C_Engine_Embedder%27s_Guide

Gtk+ 程序設計教程 "界面工具"

GTK+ 2.x 初學者教程
這個教程爲初學者描述了大部分的常用控件
[HTML] http://zetcode.com/tutorials/gtktutorial/

如何爲控件設置顏色
[HTML] http://ometer.com/gtk-colors.html

Gnome2 開發者嚮導 "Gtk+ 2.0"
[PDF] http://home.cs.tum.edu/~siegel/files/tog2dg.pdf

Gtk+ 2.0 教程
[HTML] http://library.gnome.org/devel/gtk-tutorial/stable/

Gtk+ 2.0 Tree View 教程
[HTML]  http://scentric.net/tutorial/treeview-tutorial.html
[PDF]  http://scentric.net/tutorial/treeview-tutorial.pdf
treeview 教程源碼: http://scentric.net/tutorial/treeview-tutorial.tar.gz

Gtk+ 2.0 Text View 教程
[HTML]  http://www.bravegnu.org/gtktext/
[PDF] http://www.bravegnu.org/gtktext/gtktext-0.4.pdf

Gtk+ 2.0 GtkComboBox 控件教程
[HTML]Part1 http://tadeboro.blogspot.com/2009/04/gtkcombobox-widget-part-1.html
[HTML]Part 2 http://tadeboro.blogspot.com/2009/04/as-promised-im-back-with-second-part-of.html
[HTML]Part 3 http://tadeboro.blogspot.com/2009/04/gtkcombobox-widget-part-3.html

GtkDialog 教程
[HTML] Part 1: http://tadeboro.blogspot.com/2009/04/gtkdialog-tutorial-part-1.html
[HTML] Part 2: http://tadeboro.blogspot.com/2009/04/gtkdialog-tutorial-part-2.html

動態調整GtkLabel大小
[HTML] http://tadeboro.blogspot.com/2009/05/wrapping-adn-resizing-gtklabel.html

使用彈出式窗口
[HTML] http://tadeboro.blogspot.com/2009/05/using-pop-up-windows.html

一句話描述GTK+內存管理
[HTML] http://www.gtkforums.com/viewtopic.php?t=2412

Gtk 菜單教程
[HTML] http://samuelpauls.com/posts/126

Glade & Gtk+ 教程 "Gtk+ 界面設計器"
GTK+ 和 Glade3 界面程序設計教程
[HTML] http://www.micahcarrick.com/12-24-2007/gtk-glade-tutorial-part-1.html

使用Glade-3創建GtkTreeView
[HTML] Part 1: http://tadeboro.blogspot.com/2009/04/creatin-gtktreeview-with-glade-3.html
[HTML] Part 2: http://tadeboro.blogspot.com/2009/04/creating-gtktreeview-with-glade-3-part.html

使用預編譯xml文件到共享對象實現對libglade的加速
[PDF]  http://syslog.movial.fi/uploads/compiled-libglade.pdf

Glib 教程 "Gtk+ 實用庫"
使用GLib的GKeyFile解釋器
[HTML] http://www.gtkbook.com/tutorial.php?page=keyfile

使用GLib寫測試單元
[Html] http://blogs.gnome.org/timj/2008/06/24/23062008-writing-unit-tests-with-glib/

缺失的GObject教程示例
[HTML] http://arbingersys.blogspot.com/2009/07/missing-gobject-tutorial-sample.html

GObject 教程
[HTML] http://madison-project.wikidot.com/local--files/tutorials/gobject-0.10.0-html.tar.gz

Hildon 教程 "Hildon是一個基於GTK的手機設備的用戶界面工具"
Hildon 教程
[HTML] http://maemo.org/api_refs/5.0/beta/tutorial/html/

Pango 教程 "Gtk+ 文本格式化和翻譯庫"
The Pango connection:
[HTML] Part1: http://www.ibm.com/developerworks/library/l-u-pango1/
[HTML] Part 2: http://www.ibm.com/developerworks/library/l-u-pango2/

Cairo 教程"2D 矢量圖形庫"
Cairo 圖形教程.
這個教程適合初級和中級用戶
[HTML]  http://zetcode.com/tutorials/cairographicstutorial/

Cairo 概念
[HTML] http://cairographics.org/tutorial/

使用Cairo 和GTK+ 2.0 編寫一個控件
[HTML] Part1: http://www.gnomejournal.org/article/34/writing-a-widget-using-cairo-and-gtk28
[HTML] Part2: http://www.gnomejournal.org/article/36/writing-a-widget-using-cairo-and-gtk28-part-2

Clutter "2D/3D 多媒體工具包" - "Gtk+, Cairo, Gstreamer, Libvlc, Webkit, MD2, Mozembed plugins available."
Clutter 0.8程序設計
[Html] http://www.openismus.com/documents/clutter_tutorial/0.8/docs/tutorial/html/
[Pdf] http://www.openismus.com/documents/clutter_tutorial/0.8/docs/tutorial/pdf/programming-with-clutter.pdf
Clutter 0.9程序設計
[HTML] http://www.openismus.com/documents/clutter_tutorial/0.9/docs/tutorial/html/index.html
Clutter 1.0程序設計
[HTML] http://www.openismus.com/documents/clutter_tutorial/1.0/docs/tutorial/html/index.html

Clutter 插件

Gtk+, Cairo, Gstreamer 插件
http://www.clutter-project.org/sources/

Webkit 插件
git clone git://git.o-hand.com/webkit

VLC 插件
http://github.com/rno/clutter-vlc/tree/master

MD2 插件
http://github.com/bpeel/clutter-md2/tree/master

Mozembed 插件
http://git.clutter-project.org/cgit.cgi?url=clutter-mozembed/tree/tests

Gstreamer 教程 "音視頻多媒體工具包"
GStreamer 是一個用C語言寫的基於GObject的多媒體框架
程序開發手冊:
[HTML] http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/index.html
[PDF] http://gstreamer.freedesktop.org/data/doc/gstreamer/stable/manual/manual.pdf
插件編寫指導 :
[HTML] http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/index.html
[PDF] http://gstreamer.freedesktop.org/data/doc/gstreamer/stable/pwg/pwg.pdf

GStreamer 快速入門教程
[HTML] Part1: http://bluwiki.com/go/GStreamer
[HTML] Part2:  http://bluwiki.com/go/GStreamer/C_Hello_World

GStreamer 插件開發視頻
[HTML] http://lca2007.linux.org.au/talk/272.html
[VIDEO] http://mirror.linux.org.au/pub/linux.conf.au/2007/video/talks/272.ogg

Opengl 教程 "3D圖形庫"
OpenGL 程序設計指南 "紅書"
[PDF] http://madison-project.wikidot.com/local--files/tutorials/OpenGL_Programming_Guide.pdf

OpenGL 參考手冊 "藍書"
[Pdf] http://madison-project.wikidot.com/local--files/tutorials/OpenGl_Reference_Manual.pdf

GtkGLExt 是一個爲GTK+ 2.0的擴展
[HTML] http://www.k-3d.org/gtkglext/Main_Page <-- 下載大量的C/GTK+的示例代碼。

osgGtk 是一個基於C/GTK+控件的支持OpenSceneGraph (OSG)的程序。
這個庫同樣包含多個示例程序,像osgviewerGtk和osgviewerGtkmm.
[HTML] http://osggtk.wiki.sourceforge.net/main  <--下載C/GTK+示例代碼。.

Lexical Analyzer 和 Parser Generator
Lex & Yacc / Flex & Bison 初級教程
[Html] http://ds9a.nl/lex-yacc/cvs/output/lexyacc.html#toc1

一些Lex and Yacc的參考手冊
[Html] http://pltplp.net/lex-yacc/

Flex 手冊 "Lex"
[Html] http://flex.sourceforge.net/manual/

Bison 手冊  "Yacc"
[Html] http://www.gnu.org/software/bison/manual/html_mono/bison.html
[Pdf] http://www.gnu.org/software/bison/manual/pdf/bison.pdf

標記語言 注意: 在提供的鏈接中你會找到API參考手冊和使用示例

LibYAML 是一個用C語言寫的YAML 1.1 解釋器和執行器.
[Html] http://pyyaml.org/wiki/LibYAML

MJSON M's JSON 解釋器是一個小型的JSON解釋器
[Html] http://mjson.sourceforge.net/index.html

LibAxl (or just Axl) 是一個用C語言編寫的支持XML1.0標準規格的庫
[Html] http://www.aspl.es/axl/

Libxml2是一個C語言的爲gnome項目使用的XML解釋器和開發工具包
[Html] http://www.xmlsoft.org/

Libcroco 是一個常規的CSS解釋器,它提供了一個css2解釋器(SAC和CSSOM API),和一個CSS2選擇引擎
[Html] https://launchpad.net/libcroco

Portable Document Format (PDF)
Poppler "Poppler 是一個使用cairo來進行解析PDF文件的庫"
[HTML] http://poppler.freedesktop.org/
[Example Viewer] http://www.gtkforums.com/viewtopic.php?p=9086#9086

libharu "libHaru 是一個自由的,跨平臺的,開源的通用PDF庫."
[HTML] http://libharu.org/wiki/Main_Page
[HTML] http://libharu.org/wiki/Documentation
[注意] Cairo 同樣可以製作PDF文件,但是libharu可以更好的工作,同時擁有更多的特性。

Programming & Hardware
Linux內核模塊程序指導
[Html] http://tldp.org/LDP/lkmpg/2.6/html/index.html

藍牙程序設計 "描述簡單藍牙概念"
[PDF] http://people.csail.mit.edu/rudolph/Teaching/Articles/PartOfBTBook.pdf
一個藍牙程序設計的介紹
[Html] http://people.csail.mit.edu/albert/bluez-intro/

LibParted Handbook "注意: LibParted 是一個創建,刪除,更改大小和複製PC硬盤分區的庫"
[PDF] http://zester.googlecode.com/files/libparted_handbook.pdf

HAL Tutorial "硬件抽象層"
[HTML] http://www.share-linux.com/hal1.php
[HTML] http://www.share-linux.com/hal2.php
[PDF] http://madison-project.wikidot.com/local--files/tutorials/Hal_Tutorial.pdf

LIRC 程序設計指南 "LIRC 是一個允許你解密紅外信號並進行遠程控制的包"
[HTML] http://www.lirc.org/html/technical.html#applications

Libusb 程序設計教程 "libusb 是一個不要使用內核模塊驅動的基於用戶模式的USB數據傳輸庫"
[HTML] http://www.linuxforums.org/forum/linux-tutorials-howtos-reference-material/10865-developing-usb-device-drivers-userspace-using-libusb.html

Libburnia API手冊和代碼示例 "libburnia 是一個讀寫光盤的庫。"
[HTML] http://api.libburnia-project.org/libburn/
[HTML] http://api.libburnia-project.org/libisofs/index.html
[HTML] http://api.libburnia-project.org/libisoburn/

Libmtp "libmtp 是一個LGPL協議的實現媒體傳輸協議(MTP)的庫,一個圖片傳輸協議(PTP)的超集。 "
[HTML] http://libmtp.sourceforge.net/index.php <--下載API手冊和代碼

Libgpod "libgpod 是一個訪問iPod的動態庫,它支持播放列表,智能播放列表,播放計數,跳過計數等等。"
[HTML] http://www.gtkpod.org/libgpod/docs/ <--下載文檔和示例代碼

Libgphoto2 "libgphoto2 是一個訪問數碼相機的核心庫。"
[HTML] http://www.gphoto.org/proj/libgphoto2/ <-- 下載API手冊和示例代碼

V4L2 "Video4Linux2 or V4L2 是一個Linux下視頻採集程序接口,支持USB Webcams,TV tuners和其它設備。 Video4Linux2 與Linux 內核密切的聯繫在一起。"
[HTML] http://v4l2spec.bytesex.org/spec-single/v4l2.html#AEN163

DBus 教程 "消息總線系統"
[HTML] http://www.share-linux.com/dbus1.php
[HTML] http://www.share-linux.com/dbus2.php
[PDF] http://madison-project.wikidot.com/local--files/tutorials/Dbus_Tutorial.pdf

數據庫編程
MySQL 數據庫 C語言 API 程序設計教程
[Html] http://zetcode.com/tutorials/mysqlcapitutorial/

PostgreSQL
-------------
PostgreSQL 數據庫 libpq C API 教程
[HTML] http://www.postgresql.org/docs/8.4/static/libpq.html

Accessing PostgreSQL From Code (Beginners C)
[HTML] http://tutorials.freeskills.com/professional-linux-programming-part-1-accessing-postgresql-from-code.htm

Berkley DB C API
-----------------
開始學習數據存儲:
[Pdf] http://www.oracle.com/technology/documentation/berkeley-db/db/gsg/C/BerkeleyDB-Core-C-GSG.pdf
[Html] http://www.oracle.com/technology/documentation/berkeley-db/db/gsg/C/index.html
開始學習事務過程:
[Pdf] http://www.oracle.com/technology/documentation/berkeley-db/db/gsg_txn/C/BerkeleyDB-Core-C-Txn.pdf
[Html] Getting Started with Transaction Processing
開始學習複製:
[Pdf] http://www.oracle.com/technology/documentation/berkeley-db/db/gsg_db_rep/C/Replication-C-GSG.pdf
[Html] http://www.oracle.com/technology/documentation/berkeley-db/db/gsg_db_rep/C/index.html
參考指南:
[Html] http://www.oracle.com/technology/documentation/berkeley-db/db/ref/toc.html
Programmatic API:
[Html] http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/frame.html

Hamster DB
--------------
[Site] http://hamsterdb.com/index
[PDF] http://hamsterdb.com/public/dl/tutorial.pdf
[Examples] http://hamsterdb.com/documentation/samples

Sqlite 嵌入式數據庫.
[HTML] http://souptonuts.sourceforge.net/readme_sqlite_tutorial.html

壓縮庫
SCZ
[HTML] http://scz-compress.sourceforge.net/
[API] http://scz-compress.sourceforge.net/api.html

QuickLZ
[HTML] http://www.quicklz.com/manual.html
[Examples] http://www.quicklz.com/download.html

Zlib
[HTML] http://www.zlib.net/zlib_docs.html
[Examples] http://www.zlib.net/zlib_how.html

Libarchive "用於讀寫tar,cpio,zip,bzip,gzip,ISO和其它壓縮格式的C語言庫或者命令提示工具"
[HTML] http://code.google.com/p/libarchive/

網絡庫
Libcurl "libcurl是一個自由,簡單實用的客戶端URL傳輸庫, 它支持 FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS和文件. libcurl 支持 SSL 證書, HTTP POST, HTTP PUT, FTP 上傳, HTTP 表單方式上傳, 代理服務器, cookies, 用戶名和密碼驗證 (簡單, 數字, NTLM, Negotiate, Kerberos4), 斷點續傳, http隧道技術! "
[HTML] http://curl.haxx.se/libcurl/c/libcurl-tutorial.html
[API] http://curl.haxx.se/libcurl/c/
[Examples] http://curl.haxx.se/libcurl/c/example.html

Libpcap "libpcap 是一個系統級的爲用戶提供網絡抓包接口的庫。"
[HTML] http://yuba.stanford.edu/~casado/pcap/section1.html

Libnids "Libnids is an implementation of an E-component of Network Intrusion Detection System. It emulates the IP stack of Linux 2.0.x. Libnids offers IP defragmentation, TCP stream assembly and TCP port scan detection."
[HTML] http://libnids.sourceforge.net/
[EXAMPLE] http://libnids.sourceforge.net/printall.c

Libsoup "libsoup is an HTTP client/server library for GNOME. It uses GObjects and the glib main loop, to integrate well with GNOME applications."
[HTML] http://library.gnome.org/devel/libsoup/stable/

libEtPan  "libEtPan is a mail purpose library. It will be used for low-level mail handling : network protocols (IMAP/NNTP/POP3/SMTP over TCP/IP and SSL/TCP/IP, already implemented), local storage (mbox/MH/maildir), message / MIME parser."
[HTML] http://www.etpan.org/libetpan/
[HTML] http://dinh.viet.hoa.free.fr/wiki/index.php?title=LibEtPan

GeoClue "GeoClue is a software framework which can be used to enable geospatial awareness in applications. GeoClue utilizes the D-Bus inter-process communication mechanism to provide location information. Through this it aims to simplify development of location aware applications and promote code reuse within the free software and open source communities by defining a logical boundary between the applications and underlying location providers. GeoClue is licensed under the GNU Lesser General Public License and is currently available for Linux."

GeoClue provides access to multiple position providers:

    * GPS: Position information from a Global Positioning System receiver
    * Plazes: Position information from the Plazes Wi-Fi location service
    * Hostip: Position information based on IP address
    * Manual: User-provided position information

[HTML] http://en.wikipedia.org/wiki/GeoClue
[HTML] http://www.freedesktop.org/wiki/Software/GeoClue
[HTML] http://folks.o-hand.com/jku/geoclue-docs/

源代碼編譯工具
自動化編譯程序——編寫Makefile文件
[Html] http://users.actcom.co.il/~choo/lupg/tutorials/writing-makefiles/writing-makefiles.html

GNU Autoconf, Automake, And Libtool "金書"
[Html] http://sources.redhat.com/autobook/autobook/autobook_toc.html#SEC_Contents

法律資源
開源協議
軟件自由和知識產權法
[Html] http://www.rosenlaw.com/oslbook.htm

自由軟件法律中心:
[Html] http://www.softwarefreedom.org/

公共專利項目:
[Html] http://www.patent-commons.org/

示例代碼
GtkGLExt:
http://oracle.bridgewayconsulting.com.au/~davyd/misc/gtkglext-example.c

Creating and writing to an OpenGL window "GtkGLExt":
http://www.gtkforums.com/viewtopic.php?t=3568

Glib Utility Functions:
http://www.gtkforums.com/viewtopic.php?t=2809

Glib GChecksumType Examples
http://www.gtkforums.com/viewtopic.php?p=9125#9125

WebkitGtk & GtkBuilder:
http://www.gtkforums.com/viewtopic.php?t=3057

GtkIconView:
http://www.gtkforums.com/viewtopic.php?t=3103

GtkSourceView Syntax Highlighting Text Widget:
http://www.gtkforums.com/viewtopic.php?t=3105

Clutter and Clutter-box2d:
http://www.gtkforums.com/viewtopic.php?t=3128

GtkComboBox sample code:
http://www.gtkforums.com/viewtopic.php?t=3375

GTK+, Cairo & Poppler PDF Viewer example:
http://www.gtkforums.com/viewtopic.php?p=9086#9086

Terminal emulator widget VTE example
http://www.gtkforums.com/viewtopic.php?p=9087#9087

Gtk windows with alpha channels and Cairo
http://mikehearn.wordpress.com/2006/03/26/gtk-windows-with-alpha-channels/
[EXAMPLE] http://plan99.net/~mike/files/alphademo.c

A shaped input example with Gtk+, Cairo and XShape 1.1
http://macslow.thepimp.net/?p=26
[EXAMPLE] http://macslow.thepimp.net/projects/input_shape_test.c

Gtk System Tray Example
[HTML] http://yettocome.blogspot.com/2007/08/gtk-system-tray-icon-example.html

Gtk System Tray with Animated Icon Example
[HTML] http://www.gtkforums.com/viewtopic.php?t=3423

參考手冊
下面是一個當前版本GTK+和她所需要的支持庫的列表,你可以用這些庫來構建自己的GTK+程序,記住,GTK+依賴GLib,這是唯一的依賴關係。

注意:這是一些需要被加入的其它的API參考手冊。
ATK: http://library.gnome.org/devel/atk/stable/    
GDK: http://library.gnome.org/devel/gdk/stable/    
GdkPixbuf: http://library.gnome.org/devel/gdk-pixbuf/stable/    
GLib: http://library.gnome.org/devel/glib/stable/
GObject: http://library.gnome.org/devel/gobject/stable/
GTK+: http://library.gnome.org/devel/gtk/stable/
Pango: http://library.gnome.org/devel/pango/stable/
Cairo: http://www.cairographics.org/manual/
Gstreamer: http://gstreamer.freedesktop.org/documentation/
Libglade: http://library.gnome.org/devel/libglade/unstable/  
GtkGLExt:  http://gtkglext.sourceforge.net/reference/gtkglext/
Clutter 0.8: http://clutter-project.org/docs/clutter/0.8/
Clutter 0.9: http://clutter-project.org/docs/clutter/0.9/
Webkit: http://oe.linuxtogo.org/~zecke/webkit-gtk-api/index.html

如果發現有什麼問題,請與我聯繫,謝謝!
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章