
GLib Reference Manual May 17, 2009 GLib Reference Manual ii Contents 1 GLib Overview 1 1.1 Compiling the GLib package . .1 1.2 Cross-compiling the GLib package . .4 1.3 Compiling GLib Applications . .5 1.4 Running GLib Applications . .6 1.5 Changes to GLib . .8 1.6 Regular expression syntax . .9 1.7 Mailing lists and bug reports . 30 2 GLib Fundamentals 33 2.1 Version Information . 33 2.2 Basic Types . 35 2.3 Limits of Basic Types . 40 2.4 Standard Macros . 44 2.5 Type Conversion Macros . 48 2.6 Byte Order Macros . 50 2.7 Numerical Definitions . 60 2.8 Miscellaneous Macros . 63 2.9 Atomic Operations . 73 3 GLib Core Application Support 77 3.1 The Main Event Loop . 77 3.2 Threads . 104 3.3 Thread Pools . 131 3.4 Asynchronous Queues . 136 3.5 Dynamic Loading of Modules . 143 3.6 Memory Allocation . 147 3.7 IO Channels . 154 3.8 Error Reporting . 171 3.9 Message Output and Debugging Functions . 178 3.10 Message Logging . 182 4 GLib Utilities 189 4.1 String Utility Functions . 189 4.2 Character Set Conversion . 213 4.3 Unicode Manipulation . 223 4.4 Base64 Encoding . 248 4.5 Data Checksums . 251 4.6 Internationalization . 255 4.7 Date and Time Functions . 260 4.8 Random Numbers . 276 4.9 Hook Functions . 281 4.10 Miscellaneous Utility Functions . 291 4.11 Lexical Scanner . 304 4.12 Automatic String Completion . 317 4.13 Timers . 320 4.14 Spawning Processes . 322 4.15 File Utilities . 330 4.16 URI Functions . 343 4.17 Shell-related Utilities . 346 4.18 Commandline option parser . 347 4.19 Glob-style pattern matching . 361 4.20 Perl-compatible regular expressions . 364 4.21 Simple XML Subset Parser . 386 iii CONTENTS 4.22 Key-value file parser . 396 4.23 Bookmark file parser . 419 4.24 Testing . 436 4.25 Windows Compatibility Functions . 449 5 GLib Data Types 455 5.1 Memory Slices . 455 5.2 Memory Chunks . 459 5.3 Doubly-Linked Lists . 466 5.4 Singly-Linked Lists . 478 5.5 Double-ended Queues . 487 5.6 Sequences . 498 5.7 Trash Stacks . 509 5.8 Hash Tables . 510 5.9 Strings . 523 5.10 String Chunks . 533 5.11 Arrays . 535 5.12 Pointer Arrays . 542 5.13 Byte Arrays . 548 5.14 Balanced Binary Trees . 552 5.15 N-ary Trees . 558 5.16 Quarks . 570 5.17 Keyed Data Lists . 572 5.18 Datasets . 576 5.19 Relations and Tuples . 580 5.20 Caches . 584 5.21 Memory Allocators . 588 6 GLib Tools 591 6.1 glib-gettextize . 591 6.2 gtester . 591 6.3 gtester-report . 592 Index 593 iv List of Figures 3 GLib Core Application Support 3.1 States of a Main Context . 81 4 GLib Utilities 4.1 Conversion between File Name Encodings . 215 v List of Tables 1 GLib Overview 1.1 Metacharacters outside square brackets . 10 1.2 Metacharacters inside square brackets . ..
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages616 Page
-
File Size-