---
title: "GLib 入門"
author: "cjc"
date: "2008-08-30T10:13:00Z"
tags: []
slug: "glib"
draft: false
lastmod: "2008-08-30T10:13:00Z"
id: 402853
url: "https://cjc.iteye.com/blog/402853"
---

&lt;script&gt;function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();}&lt;/script&gt;

- 基本型態、巨集、公用（Utility）函式

一些有的沒的常用 函式，先放在一起講......Orz

- - [GLib 基本型態與巨集](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GLibBasicTypeMacro.html)
  - [GTimer](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GTimer.html)
  - [Timeout 與 Idle](http://caterpillar.onlyfun.net/Gossip/GTKGossip/TimeoutIdle.html)
  - [環 境資訊](http://caterpillar.onlyfun.net/Gossip/GTKGossip/EnvironmentInfo.html)
  - [日誌 （Logging）](http://caterpillar.onlyfun.net/Gossip/GTKGossip/Logging.html)

<!--THE END-->

- 輸入輸出

來了解一些基本檔 案讀寫、目錄資訊的取得方式，以及輸入輸出 Channel 的使用。

- - [基 本檔案讀寫](http://caterpillar.onlyfun.net/Gossip/GTKGossip/BasicFileRW.html)
  - [目錄資訊](http://caterpillar.onlyfun.net/Gossip/GTKGossip/DirOp.html)
  - [GIOChannel 與 檔案處理](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GIOChannelFile.html)
  - [GIOChannel 與 Pipe](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GIOChannelPipe.html)
- 資料結構、記憶體配置

來看看 GLib 提供了哪些常用的資料結構處理及動態記憶體配置函式。

- - [GString](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GString.html)
  - [GArray、GPtrArray、 GByteArray](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GArrayGPtrArrayGByteArray.html)
  - [GSList、GList](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GSListGList.html)
  - [GHashTable](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GHashTable.html)
  - [GTree 與 GNode](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GTreeGNode.html)
  - [記憶體配置](http://caterpillar.onlyfun.net/Gossip/GTKGossip/MemoryAllocation.html)

<!--THE END-->

- 執 行緒

GLib 提供了 GThread 作為多執行緒的支援。

- - [GThread](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GThread.html)
  - [GMutex](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GMutex.html)
  - [GCond](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GCond.html)