Skip to content

emka.web.id

menulis pengetahuan – merekam peradaban

Menu
  • Home
  • Tutorial
  • 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

  • Inilah Beasiswa Bekraf Digital Talent 2026: Solusi Buat Kalian yang Mau Jago AI dan Makin Produktif
  • Inilah Cara Memilih Power Bank yang Aman Dibawa ke Pesawat Agar Tidak Disita Petugas
  • Inilah Bocoran Harga dan Spesifikasi Redmi K90 Max, HP Gaming Dimensity 9500 Termurah yang Segera Dirilis!
  • Inilah RedMagic Gaming Tablet 5 Pro, Monster Gaming dengan Layar 185Hz dan Chipset Snapdragon 8 Elite yang Bikin Melongo!
  • Inilah Kenapa IGRS Trending di X, Bocorkan Spoiler Penting Game 007 First Light Hingga Ending!
  • Inilah 5 HP Murah Terbaru dengan Baterai Jumbo yang Siap Masuk Indonesia 2026, Ada yang Sampai 7.800 mAh!
  • Inilah Alasan Kenapa Samsung Galaxy S27 Bakal Pakai 50 Persen Chipset Exynos, Qualcomm Mulai Ditinggalkan?
  • Inilah Vivo Y31d Pro, Smartphone “Badak” dengan Baterai 7000mAh dan Ketahanan Standar Militer
  • Inilah 11 Game Penghasil Saldo DANA Tercepat 2026, Cara Asyik Cari Cuan Sambil Rebahan!
  • Inilah Motorola Edge 70 Pro, HP Midrange Gahar dengan Baterai 6500 mAh yang Siap Meluncur!
  • Inilah Kode Redeem FF Max 15 April 2026, Buru Skin Undersea Splatter dan Item Eksklusif Bawah Laut Sekarang!
  • Inilah Bocoran Vivo X500 Series dan Kamera Vlogging Saku yang Bakal Bikin DJI Ketar-ketir!
  • Inilah 6 Rekomendasi HP Gaming Paling Murah April 2026, Main Game Berat Nggak Pake Lag!
  • Inilah Caranya Manfaatin SPayLater di Aplikasi ShopeePay Biar Keuangan Tetap Aman Saat Tanggal Tua
  • Inilah Perbedaan Durasi Reels IG dan FB Terbaru 2026, Ternyata Bisa Sampai 20 Menit Lho!
  • Inilah Cara Mengurus Surat Keterangan Bebas Narkoba (SKBN), Syarat Lengkap, Biaya, dan Lokasi Pembuatannya
  • Inilah Cara Pakai Panel Zurra v2 FF Aim Lock Headshot, Simak Fitur dan Risikonya Sebelum Pakai!
  • Inilah Alasan Kenapa Sesi Akhir UTBK 2026 Nggak Lebih Sulit dan Penjelasan Lengkap Sistem Penilaiannya
  • Inilah Kenapa Tidak Bisa Login WA Web dan Solusi Paling Ampuh Biar Langsung Connect Lagi
  • Inilah Cara Mengatasi MyTelkomsel Oops Terjadi Kesalahan, Jangan Panik Dulu!
  • Inilah Cara Mengisi SKP Satpol PP dan Pranata Trantibum 2026 di e-Kinerja My ASN, Dijamin Anti Ribet!
  • Inilah Cara Akses IPTV Playlist M3U Indonesia Terbaru 2026, Nonton Ribuan Channel Tanpa Biaya!
  • Tutorial SEO Anchor Link: Cara Dapat Ranking di Google Lewat Strategi Link Building yang Aman
  • Inilah Huawei Pura 90 Pro, HP Flagship dengan Desain Kamera Segitiga Unik dan Performa Kirin yang Makin Gahar
  • Inilah 5 Rekomendasi Kipas Tangan Portable Cas Tahan Lama Biar Kalian Tetap Adem Saat Cuaca Panas Ekstrem
  • Inilah MacBook Neo, Laptop Termurah Apple yang Ternyata Punya Performa Gaming Gila!
  • Inilah Daftar Tablet SIM Card 5G dengan Keyboard Terbaik 2026 untuk Kerja Remote
  • Inilah Daftar Game Penghasil Pulsa 2026, Cara Cerdas Dapat Kuota Gratis Tanpa Keluar Duit Sepeserpun!
  • Inilah Caranya Klaim Bonus Kuota Lokal Smartfren 2026, Jangan Sampai Bonus Kalian Hangus Sia-sia!
  • Inilah Cara Mengatasi Rockstar Games Launcher Not Responding dan Macet Saat Connecting
  • Is it Time to Replace Nano? Discover Fresh, the Terminal Text Editor You Actually Want to Use
  • How to Design a Services Like Google Ads
  • How to Fix 0x800ccc0b Outlook Error: Step-by-Step Guide for Beginners
  • How to Fix NVIDIA App Error on Windows 11: Simple Guide
  • How to Fix Excel Formula Errors: Quick Fixes for #NAME
  • How to Create Music Offline using Go-Compose AI: A Step-by-Step Guide
  • How to Effortlessly Create Professional ID Photos at Home Using HitPaw
  • How to Master AI Video Storytelling with Seendance 2.0 & Artlist Workflow
  • How to Get Google Veo 3 for Free: Your Ultimate Guide to AI Video Creation
  • How to Build a Powerful AI Agent Workflow for Your Business with GLM 5V Turbo Vision
  • Apa itu Spear-Phishing via npm? Ini Pengertian dan Cara Kerjanya yang Makin Licin
  • Apa Itu Predator Spyware? Ini Pengertian dan Kontroversi Penghapusan Sanksinya
  • Mengenal Apa itu TONESHELL: Backdoor Berbahaya dari Kelompok Mustang Panda
  • Siapa itu Kelompok Hacker Silver Fox?
  • Apa itu CVE-2025-52691 SmarterMail? Celah Keamanan Paling Berbahaya Tahun 2025

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