Skip to content

emka.web.id

menulis pengetahuan – merekam peradaban

Menu
  • Home
  • Tutorial
  • Makalah
  • Ke-NU-an
  • Kabar
  • Search
Menu

What is glib?

Posted on April 7, 2012

glib is a C portability and utility library for UNIX-like systems and Windows. This chapter covers some of the most commonly-used library features in GTK+ and Gnome applications. glib is simple, and the concepts are familiar; so we’ll move quickly. For more complete coverage of glib, see glib.h or the free glib reference manual that comes with the library. (By the way: don’t be afraid of using the glib, GTK+, or Gnome header files; they are very clean and easy to read, and are handy as a quick reference. For that matter, don’t be afraid to look at the source code, if you have very specific questions about the implementation.)

glib’s various facilities are intended to have a consistent interface; the coding style is semi-object-oriented, and identifiers are prefixed with “g” to create a kind of names- pace.

glib has a single header file, glib.h.

glib provides substitutes for many standard and commonly-used C language con- structs. This section describes glib’s fundamental type definitions, macros, memory allocation routines, and string utility functions.

Type Definitions
Rather than using C’s standard types (int, long, etc.) glib defines its own. These serve a variety of purposes. For example, gint32 is guaranteed to be 32 bits wide, something no standard C type can ensure. guint is simply easier to type than unsigned. A few of the typedefs exist only for consistency; for example, gchar is always equivalent to the standard char.

The following primitive types are defined by glib:
• gint8, guint8, gint16, guint16, gint32, guint32, gint64, guint64—these give you in- tegers of a guaranteed size. Not all platforms provide 64-bit integers; if a platform has them, glib will define G_HAVE_GINT64. (If it isn’t obvious, the guint types are unsigned, the gint types are signed.)
• gboolean is useful to make your code more readable, since C has no bool type.
• gchar, gshort, glong, gint, gfloat, gdouble are purely cosmetic.
• gpointer may be more convenient to type than void *. gconstpointer gives you const void*. (const gpointer will not do what you typically mean it to; spend some time with a good book on C if you don’t see why.)

Terbaru

  • Profil Farida Farichah, Wakil Menteri Koperasi Kabinet Merah Putih Reshuffle 17 September 2025
  • Ini Info Terbaru Pencairan BSU BPJS Ketenagakerjaan 2025!
  • Cara Reset Printer Epson L3110 2025
  • WhatsApp Tiba-tiba Keluar dan Meminta Verifikasi: Apa yang Harus Dilakukan?
  • Bisakah Saldo BNI Kamu Nol? Fakta dan Cara Mengatasinya
  • Inilah Tanda-tanda Chat Audio di Grup WhatsApp Sudah Disadap
  • Cara Mengatasi Tidak Bisa Live Instagram Karena Tidak Memenuhi Syarat
  • 7 Spek Laptop yang Ideal untuk Coding & Ngoding Web/App
  • Keuntungan dan Kerugian Menggunakan PayPal: Panduan Lengkap
  • Cara Menggunakan Stellarium Web
  • Cara Menghapus Data KTP Pribadi di Pinjol yang Belum Lunas
  • Cara Mengganti Nomor TikTok yang Tidak Aktif atau Hilang Tanpa Verifikasi
  • Cara Menggunakan BCA PayLater Terbaru 2025
  • Cara Mendapatkan IMPoint Indosat IM3 Ooredoo Gratis via MyIM3
  • Apa Arti TikTok ‘Shared With You’?
  • Cara Menghapus Data KTP di Pinjol: Panduan Lengkap
  • Cara Download WhatsApp GB Terbaru 2025 – Fitur Lengkap & Aman
  • Review WhatsApp Beta: Apakah Aman? Cara Instal dan Cara Keluar
  • Bebong: Makna, Asal Usul, dan Penggunaan dalam Bahasa Indonesia
  • Spinjam dan Spaylater: Apa yang Terjadi Jika Terlambat Membayar dan Bisakah Meminjam Lagi?
  • Cara Download dan Menonton Dood Stream Tanpa Iklan – Doods Pro
  • Cara Menghentikan dan Mengatasi Pinjol Ilegal
  • Kode Bank BRI untuk Transfer ke PayPal
  • Cara Menyadap WhatsApp Tanpa Aplikasi dan Kode QR
  • Apa yang Terjadi Jika Telat Bayar Shopee PayLater?
  • Telat Bayar Listrik 1 Hari: Apa yang Terjadi?
  • Cara Mengunduh Foto Profil WhatsApp Teman di Android, iPhone, dan PC/Mac
  • Rekomendasi Aplikasi Edit Foto Ringan Terbaik untuk PC Windows dan macOS
  • Cara Membeli Diamond Mobile Legends Menggunakan Pulsa Telkomsel
  • Tutorial Menggunakan Aplikasi Dana: Cara Top Up Dana dengan Mudah, Cepat, dan Murah untuk Pemula
  • Profil Farida Farichah, Wakil Menteri Koperasi Kabinet Merah Putih Reshuffle 17 September 2025
  • Ini Info Terbaru Pencairan BSU BPJS Ketenagakerjaan 2025!
  • Cara Reset Printer Epson L3110 2025

©2025 emka.web.id | Design: Newspaperly WordPress Theme