【学习博客】
一、glibglib介绍
1.1 类型介绍glib的类型定义在gtypes.h文件中,关键定义如下:
1.1.1 不规则类型gboolean gpointer gconstpointer gchar guchar1.1.2 整型
gint G_MININT G_MAXINT guint G_MAXUINT gshort G_MINSHORT G_MAXSHORT gushort G_MAXUSHORT glong G_MINLONG G_MAXLONG gulong G_MAXULONG gint8 G_MININT8 G_MAXINT8 guint8 G_MAXUINT8 gint16 G_MININT16 G_MAXINT16 G_GINT16_MODIFIER G_GINT16_FORMAT guint16 G_MAXUINT16 G_GUINT16_FORMAT gint32 G_MININT32 G_MAXINT32 G_GINT32_MODIFIER G_GINT32_FORMAT guint32 G_MAXUINT32 G_GUINT32_FORMAT gint64 G_MININT64 G_MAXINT64 G_GINT64_MODIFIER G_GINT64_FORMAT G_GINT64_CONSTANT guint64 G_MAXUINT64 G_GUINT64_FORMAT G_GUINT64_CONSTANT 指针 gintptr G_GINTPTR_MODIFIER G_GINTPTR_FORMAT guintptr G_GUINTPTR_FORMAT1.1.3 浮点型
gfloat G_MINFLOAT G_MAXFLOAT gdouble G_MINDOUBLE G_MAXDOUBLE1.1.4 size
gsize G_MAXSIZE G_GSIZE_MODIFIER G_GSIZE_FORMAT gssize G_MINSSIZE G_MAXSSIZE G_GSSIZE_MODIFIER G_GSSIZE_FORMAT goffset G_MINOFFSET G_MAXOFFSET G_GOFFSET_MODIFIER G_GOFFSET_FORMAT G_GOFFSET_CONSTANT1.2 宏介绍 2.1.1 glibconfig.h中包含定义了一些有关系统的宏
#define G_MODULE_SUFFIX "so" ... #define G_DIR_SEPARATOR '/' #define G_DIR_SEPARATOR_S "/" #define G_SEARCHPATH_SEPARATOR ':' #define G_SEARCHPATH_SEPARATOR_S ":" ... 类型转换 #define GPOINTER_TO_INT(p) ((gint) (glong) (p)) #define GPOINTER_TO_UINT(p) ((guint) (gulong) (p)) #define GINT_TO_POINTER(i) ((gpointer) (glong) (i)) #define GUINT_TO_POINTER(u) ((gpointer) (gulong) (u))2.1.2 gmacros.h中定义了宏
#define FALSE (0) #define TRUE (!FALSE) #define MAX(a, b) (((a) > (b)) ? (a) : (b)) #define MIN(a, b) (((a) < (b)) ? (a) : (b)) #define ABS(a) (((a) < 0) ? -(a) : (a)) #define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x))) #define G_APPROX_VALUE(a, b, epsilon) (((a) > (b) ? (a) - (b) : (b) - (a)) < (epsilon)) ... G_SIZEOF_MEMBER G_STRUCT_MEMBER G_STRUCT_MEMBER_P G_STRUCT_OFFSET2.1.3 gtypes.h中定义了宏
#define G_LITTLE_ENDIAN 1234
#define G_BIG_ENDIAN 4321
#define G_PDP_ENDIAN 3412
...
#define g_ntohl(val) (GUINT32_FROM_BE (val))
#define g_ntohs(val) (GUINT16_FROM_BE (val))
#define g_htonl(val) (GUINT32_TO_BE (val))
#define g_htons(val) (GUINT16_TO_BE (val))
#define g_uint_checked_add(dest, a, b)
(!__builtin_add_overflow(a, b, dest))
#define g_uint_checked_mul(dest, a, b)
(!__builtin_mul_overflow(a, b, dest))
#define g_uint64_checked_add(dest, a, b)
(!__builtin_add_overflow(a, b, dest))
#define g_uint64_checked_mul(dest, a, b)
(!__builtin_mul_overflow(a, b, dest))
#define g_size_checked_add(dest, a, b)
(!__builtin_add_overflow(a, b, dest))
#define g_size_checked_mul(dest, a, b)
(!__builtin_mul_overflow(a, b, dest))
1.2 通用函数介绍
1.2.1 错误函数
g_error_new g_error_new_literal g_error_new_valist g_error_free g_error_copy g_error_matches g_set_error g_set_error_literal g_propagate_error g_clear_error g_prefix_error g_prefix_error_literal g_propagate_prefixed_error GErrorInitFunc GErrorCopyFunc GErrorClearFunc G_DEFINE_EXTENDED_ERROR g_error_domain_register_static g_error_domain_register1.2.2 事件循环
g_main_loop_new g_main_loop_ref g_main_loop_unref g_main_loop_run g_main_loop_quit g_main_loop_is_running g_main_loop_get_context g_main_new g_main_destroy g_main_run g_main_quit g_main_is_running G_PRIORITY_HIGH G_PRIORITY_DEFAULT G_PRIORITY_HIGH_IDLE G_PRIORITY_DEFAULT_IDLE G_PRIORITY_LOW 时间循环的上下文创建 GMainContext GMainContextFlags g_main_context_new g_main_context_new_with_flags g_main_context_ref g_main_context_unref g_main_context_default g_main_context_iteration g_main_iteration g_main_context_pending g_main_pending g_main_context_find_source_by_id g_main_context_find_source_by_user_data g_main_context_find_source_by_funcs_user_data g_main_context_wakeup g_main_context_acquire g_main_context_release g_main_context_is_owner g_main_context_wait g_main_context_prepare g_main_context_query g_main_context_check g_main_context_dispatch g_main_context_set_poll_func g_main_context_get_poll_func GPollFunc g_main_context_add_poll g_main_context_remove_poll g_main_depth g_main_current_source g_main_set_poll_func g_main_context_invoke g_main_context_invoke_full GMainContextPusher g_main_context_pusher_new g_main_context_pusher_free g_main_context_get_thread_default g_main_context_ref_thread_default g_main_context_push_thread_default g_main_context_pop_thread_default 超时资源创建 g_timeout_source_new g_timeout_source_new_seconds g_timeout_add g_timeout_add_full g_timeout_add_seconds g_timeout_add_seconds_full idle资源 g_idle_source_new g_idle_add g_idle_add_full g_idle_remove_by_data 资源函数 GSource GSourceDummyMarshal GSourceFuncs GSourceDisposeFunc GSourceCallbackFuncs g_source_new g_source_ref g_source_unref g_source_set_funcs g_source_set_dispose_function g_source_attach g_source_destroy g_source_is_destroyed g_source_set_priority g_source_get_priority g_source_set_can_recurse g_source_get_can_recurse g_source_get_id g_source_get_name g_source_set_name g_source_set_static_name g_source_set_name_by_id g_source_get_context g_source_set_callback GSourceFunc G_SOURCE_FUNC g_source_set_callback_indirect g_source_set_ready_time g_source_get_ready_time g_source_add_unix_fd g_source_remove_unix_fd g_source_modify_unix_fd g_source_query_unix_fd g_source_add_poll g_source_remove_poll g_source_add_child_source g_source_remove_child_source g_source_get_time g_source_get_current_time g_source_remove g_source_remove_by_funcs_user_data g_source_remove_by_user_data GClearHandleFunc g_clear_handle_id
Glib实现了完整的事件循环分发机制,每个主循环负责处理各种事件,事件通过事件源描述。
每个事件源都会关联一个GMainCOntext,一个线程只能运行一个GMaincontext,但是其它线程能够对事件源进行添加和删除操作。
// 代表一个主事件循环,通过g_main_loop_new来创建,在添加完毕初始事件源后执行
// g_main_loop_run() 主循环将持续不断的检查每个事件源产生的新事件,然后分发它们,、
//最后通过g_main_loop_quit()退出
struct _GMainLoop
{
GMainContext *context;
gboolean is_running;
gint ref_count;
};
struct _GMainContext
{
GMutex mutex;
GCond cond;
GThread *owner;
guint owner_count;
GMainContextFlags flags;
GSList *waiters;
gint ref_count;
GHashTable *sources;
GPtrArray *pending_dispatches;
gint timeout;
guint next_id;
GList *source_lists;
gint in_check_or_prepare;
GPollRec *poll_records;
guint n_poll_records;
GPollFD *cached_poll_array;
guint cached_poll_array_size;
GWakeup *wakeup;
GPollFD wake_up_rec;
gboolean poll_changed;
GPollFunc poll_func;
gint64 time;
gboolean time_is_fresh;
};
//每个事件源
struct _GSource
{
gpointer callback_data;
// 所有事件源的回调函数
GSourceCallbackFuncs *callback_funcs;
const GSourceFuncs *source_funcs;
guint ref_count;
GMainContext *context;
gint priority;
guint flags;
guint source_id;
GSList *poll_fds;// 监听的fd
GSource *prev;
GSource *next;
char *name;
GSourcePrivate *priv;
};
struct _GSourceFuncs
{
gboolean (*prepare) (GSource *source,
gint *timeout_);
gboolean (*check) (GSource *source);
gboolean (*dispatch) (GSource *source,
GSourceFunc callback,
gpointer user_data);
void (*finalize) (GSource *source);
GSourceFunc closure_callback;
GSourceDummyMarshal closure_marshal;
};
上面三个核心结构体就是整个事件的核心,GSource代表一个事件源,内部有一个回调函数,当该事件源有事件发生的时候就触发该函数。
另外事件源有四个函数prepare、check、dispatch以及finalize,这四个函数代表了了一个事件源的生命不同周期:
prepare : 设置检查事件时间超时。如果返回 TRUE, check 会立刻被调用;如果返回 FALSE 并设置了 timeout , timeout 时间后 check 会被调用。
check : 检查事件是否准备完毕。返回 TRUE 为准备完毕, dispatch 会被立刻调用;返回 FALSE 不调用 dispatch,进入下一次事件循环。
dispatch : 分发事件。返回 TRUE 将继续下一次操作循环;返回 FALSE 中止本事件源的事件循环。
finalize : 当事件源被移除时被调用。
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-DH92USTF-1652539228309)(gst-event-loop.png)]
如下代码是对调用的分析:
GMainLoop *
g_main_loop_new (GMainContext *context,
gboolean is_running)
{
GMainLoop *loop;
if (!context)
context = g_main_context_default();
g_main_context_ref (context);
loop = g_new0 (GMainLoop, 1);
loop->context = context;
loop->is_running = is_running != FALSE;
loop->ref_count = 1;
TRACE (GLIB_MAIN_LOOP_NEW (loop, context));
return loop;
}
void
g_main_loop_run (GMainLoop *loop)
{
GThread *self = G_THREAD_SELF;
g_return_if_fail (loop != NULL);
g_return_if_fail (g_atomic_int_get (&loop->ref_count) > 0);
[...]
g_atomic_int_set (&loop->is_running, TRUE);
while (g_atomic_int_get (&loop->is_running))
g_main_context_iterate (loop->context, TRUE, TRUE, self);
UNLOCK_CONTEXT (loop->context);
g_main_context_release (loop->context);
g_main_loop_unref (loop);
}
static gboolean
g_main_context_iterate (GMainContext *context,
gboolean block,
gboolean dispatch,
GThread *self)
{
//[...]
// prepare阶段
g_main_context_prepare (context, &max_priority);
while ((nfds = g_main_context_query (context, max_priority, &timeout, fds,
allocated_nfds)) > allocated_nfds)
{
LOCK_CONTEXT (context);
g_free (fds);
context->cached_poll_array_size = allocated_nfds = nfds;
context->cached_poll_array = fds = g_new (GPollFD, nfds);
UNLOCK_CONTEXT (context);
}
if (!block)
timeout = 0;
g_main_context_poll (context, timeout, max_priority, fds, nfds);
// check 阶段
some_ready = g_main_context_check (context, max_priority, fds, nfds);
//分发阶段
if (dispatch)
g_main_context_dispatch (context);
g_main_context_release (context);
// [...]
return some_ready;
}
Glib实现了一个功能强大的事件循环分发处理机制,Glib内部提供三种类型的事件源:
- Timeout
- Idle
- ChildWatch
glib中已经提供了几个GSource的子类,其中的g_timeout_source_new(guint interval)和g_idle_source_new(void)这两个函数构造出的GSource子类,就并不使用文件描述符号。
GTimeoutSource,只需要保存设定的间隔时间,在poll轮循的prepare和check阶段,会去检查设定的这个间隔时间是否到达,如果到达设定的时间,则它的dispatch函数会被调用。
g_idle_source_new(void)其实都没有继承GSource,它也不需要和文件绑定,只不过它的优先级比较低,只有在poll轮询的空闲阶段,它的dispatch函数会被调用。而它的prepare和check函数,始终都是返回的TRUE。Timeout事件源使用案例:
int main(int argc, char const *argv[]) {
GMainLoop *loop = g_main_loop_new(NULL, FALSE);
g_timeout_add(1000, count_down, NULL);
g_timeout_add(8000, cancel_fire, loop);
g_idle_add(say_idle, NULL);
g_main_loop_run(loop);
g_main_loop_unref(loop);
return 0;
}
Idle事件源
Child Watch——系统定义的事件源
Child Watch——自定义事件源
#include1.2.3 线程类函数//设置检查事件时间超时。如果返回 TRUE, check 会立刻被调用;如果返回 FALSE 并设置了 timeout , timeout 时间后 check 会被调用。 gboolean source_prepare_cb(GSource * source, gint * timeout) { g_printf("preparen"); *timeout = 1000; return FALSE; } //检查事件是否准备完毕。返回 TRUE 为准备完毕, dispatch 会被立刻调用;返回 FALSE 不调用 dispatch,进入下一次事件循环。 gboolean source_check_cb(GSource * source) { g_printf("checkn"); return TRUE; } //分发事件。返回 TRUE 将继续下一次操作循环;返回 FALSE 中止本事件源的事件循环。 gboolean source_dispatch_cb(GSource * source, GSourceFunc callback, gpointer data) { g_printf("dispatchn"); return TRUE; } //当事件源被移除时被调用。 void source_finalize_cb(GSource * source) { g_printf("finalizen"); } int main(int argc, char * argv[]) { GMainLoop * mainloop; GMainContext * maincontext; GSource * source; GSourceFuncs sourcefuncs; sourcefuncs.prepare = source_prepare_cb; sourcefuncs.check = source_check_cb; sourcefuncs.dispatch = source_dispatch_cb; sourcefuncs.finalize = source_finalize_cb; mainloop = g_main_loop_new(NULL, FALSE); maincontext = g_main_loop_get_context(mainloop); source = g_source_new(&sourcefuncs, sizeof(GSource)); g_source_attach(source, maincontext); g_main_loop_run(mainloop); return 0; }
GThread GThreadFunc g_thread_new g_thread_try_new g_thread_ref g_thread_unref g_thread_join g_thread_yield g_thread_exit g_thread_self 线程池 GThreadPool g_thread_pool_new g_thread_pool_new_full g_thread_pool_push g_thread_pool_set_max_threads g_thread_pool_get_max_threads g_thread_pool_get_num_threads g_thread_pool_unprocessed g_thread_pool_free g_thread_pool_set_max_unused_threads g_thread_pool_get_max_unused_threads g_thread_pool_get_num_unused_threads g_thread_pool_stop_unused_threads g_thread_pool_set_sort_function g_thread_pool_set_max_idle_time g_thread_pool_get_max_idle_time g_thread_pool_move_to_front 异步队列 GAsyncQueue g_async_queue_new g_async_queue_new_full g_async_queue_ref g_async_queue_unref g_async_queue_push g_async_queue_push_sorted g_async_queue_push_front g_async_queue_remove g_async_queue_pop g_async_queue_try_pop g_async_queue_timeout_pop g_async_queue_length g_async_queue_sort g_async_queue_lock g_async_queue_unlock g_async_queue_ref_unlocked g_async_queue_unref_and_unlock g_async_queue_push_unlocked g_async_queue_push_sorted_unlocked g_async_queue_push_front_unlocked g_async_queue_remove_unlocked g_async_queue_pop_unlocked g_async_queue_try_pop_unlocked g_async_queue_timeout_pop_unlocked g_async_queue_length_unlocked g_async_queue_sort_unlocked 原子操作 g_atomic_pointer_get g_atomic_pointer_set g_atomic_pointer_compare_and_exchange g_atomic_pointer_add g_atomic_pointer_and g_atomic_pointer_or g_atomic_pointer_xor g_atomic_int_exchange_and_add1.2.4 互斥锁类函数
GMutex g_mutex_init g_mutex_clear g_mutex_lock g_mutex_trylock g_mutex_unlock GMutexLocker g_mutex_locker_new g_mutex_locker_free 宏函数 G_LOCK_DEFINE G_LOCK_DEFINE_STATIC G_LOCK_EXTERN G_LOCK G_TRYLOCK G_UNLOCK 递归锁 GRecMutex g_rec_mutex_init g_rec_mutex_clear g_rec_mutex_lock g_rec_mutex_trylock g_rec_mutex_unlock GRecMutexLocker g_rec_mutex_locker_new g_rec_mutex_locker_free 读写锁 GRWLockWriterLocker g_rw_lock_writer_locker_new g_rw_lock_writer_locker_free GRWLockReaderLocker g_rw_lock_reader_locker_new g_rw_lock_reader_locker_free GRWLock g_rw_lock_init g_rw_lock_clear g_rw_lock_writer_lock g_rw_lock_writer_trylock g_rw_lock_writer_unlock g_rw_lock_reader_lock g_rw_lock_reader_trylock g_rw_lock_reader_unlock g_bit_lock g_bit_trylock g_bit_unlock g_pointer_bit_lock g_pointer_bit_trylock g_pointer_bit_unlock1.2.5 条件变量类函数
GCond g_cond_init g_cond_clear g_cond_wait g_cond_timed_wait g_cond_wait_until g_cond_signal g_cond_broadcast
Glib提供了线程池和线程处理函数,首先会创建一个线程池,当有数据要处理的时候就把数据交给其中一个线程,处理完毕后再归还给线程池。
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-9XyuNHfZ-1652539228310)(glib-thread.png)]
多线程异步队列:
所有的数据组织成队列,供多线程并发访问,而这些并发控制全部在异步队列里面实现,对外面只提供读写接口;当队列中的数据为空时, 如果是读线程访问异步队列,那么这一读线程就等待,直到有数据为止;写线程向队列放数据时,如果有线程在等待数据就唤醒等待线程。
异步队列提供接口函数,提供两种类型,无锁和带锁:
typedef struct _GAsyncQueue GAsyncQueue; // 异步队列的创建 GAsyncQueue * g_async_queue_new () GAsyncQueue * g_async_queue_new_full () // 异步队列的操作 GAsyncQueue * g_async_queue_ref () void g_async_queue_unref () void g_async_queue_push () void g_async_queue_push_sorted () void g_async_queue_push_front () gboolean g_async_queue_remove () gpointer g_async_queue_pop () gpointer g_async_queue_try_pop () gpointer g_async_queue_timeout_pop () gint g_async_queue_length () void g_async_queue_sort () // 异步队列带锁和不带锁 void g_async_queue_lock () void g_async_queue_unlock () void g_async_queue_ref_unlocked () void g_async_queue_unref_and_unlock () void g_async_queue_push_unlocked () void g_async_queue_push_sorted_unlocked () void g_async_queue_push_front_unlocked () gboolean g_async_queue_remove_unlocked () gpointer g_async_queue_pop_unlocked () gpointer g_async_queue_try_pop_unlocked () gpointer g_async_queue_timeout_pop_unlocked () gint g_async_queue_length_unlocked () void g_async_queue_sort_unlocked () gpointer g_async_queue_timed_pop () gpointer g_async_queue_timed_pop_unlocked ()
案例:
#includestatic gpointer test_aqueue_push_func(gpointer data) { GAsyncQueue *aqueue = NULL; g_print("%s n", __FUNCTION__); g_print("delay 2 seconds to push data n"); g_usleep(2*1000*1000); aqueue = (GAsyncQueue *)data; g_async_queue_push(aqueue, GINT_TO_POINTER(99)); return NULL; } static gpointer test_aqueue_pop_func(gpointer data) { gpointer val = NULL; GAsyncQueue *aqueue = NULL; g_print("%s n", __FUNCTION__); aqueue = (GAsyncQueue *)data; val = g_async_queue_pop(aqueue); g_print("val: %d n", GPOINTER_TO_INT(val)); return NULL; } gint main(gint argc, gchar **argv) { GThread *thd_push, *thd_pop; GAsyncQueue *aqueue = NULL; aqueue = g_async_queue_new(); thd_push = g_thread_new("thd_push", test_aqueue_push_func, aqueue); thd_pop = g_thread_new("thd_pop", test_aqueue_pop_func, aqueue); g_thread_join(thd_push); g_thread_join(thd_pop); g_async_queue_unref(aqueue); return 0; }
线程池:
线程池是在多线程编程时经常用到的技术。在进行多线程任务处理时,如果线程频繁创建和销毁,将会使系统开销变大,在这种情况下,上一个任务执行完后不销毁之前创建的线程,后续任务重用该线程,将会大大减小开销。为了管理这些创建之后不再销毁的线程,便有了线程池的概念。
GLib的线程池除了提供一般的线程池函数外,还提供了诸如获取当前运行的线程数量、获取未处理的任务数量、获取或设置线程池的最大线程数量、获取未使用的线程数量、设置未使用的最大线程数量、停止所有目前未使用的线程,但经过实际测试,这里面有些功能并未生效。
[原文链接:https://blog.csdn.net/field1003/article/details/123436105]
struct _GThreadPool
{
GFunc func;
gpointer user_data;
gboolean exclusive;
};
GLIB_AVAILABLE_IN_ALL
GThreadPool * g_thread_pool_new (GFunc func,
gpointer user_data,
gint max_threads,
gboolean exclusive,
GError **error);
GLIB_AVAILABLE_IN_2_70
GThreadPool * g_thread_pool_new_full (GFunc func,
gpointer user_data,
GDestroyNotify item_free_func,
gint max_threads,
gboolean exclusive,
GError **error);
GLIB_AVAILABLE_IN_ALL
void g_thread_pool_free (GThreadPool *pool,
gboolean immediate,
gboolean wait_);
GLIB_AVAILABLE_IN_ALL
gboolean g_thread_pool_push (GThreadPool *pool,
gpointer data,
GError **error);
GLIB_AVAILABLE_IN_ALL
guint g_thread_pool_unprocessed (GThreadPool *pool);
GLIB_AVAILABLE_IN_ALL
void g_thread_pool_set_sort_function (GThreadPool *pool,
GCompareDataFunc func,
gpointer user_data);
GLIB_AVAILABLE_IN_2_46
gboolean g_thread_pool_move_to_front (GThreadPool *pool,
gpointer data);
GLIB_AVAILABLE_IN_ALL
gboolean g_thread_pool_set_max_threads (GThreadPool *pool,
gint max_threads,
GError **error);
GLIB_AVAILABLE_IN_ALL
gint g_thread_pool_get_max_threads (GThreadPool *pool);
GLIB_AVAILABLE_IN_ALL
guint g_thread_pool_get_num_threads (GThreadPool *pool);
GLIB_AVAILABLE_IN_ALL
void g_thread_pool_set_max_unused_threads (gint max_threads);
GLIB_AVAILABLE_IN_ALL
gint g_thread_pool_get_max_unused_threads (void);
GLIB_AVAILABLE_IN_ALL
guint g_thread_pool_get_num_unused_threads (void);
GLIB_AVAILABLE_IN_ALL
void g_thread_pool_stop_unused_threads (void);
GLIB_AVAILABLE_IN_ALL
void g_thread_pool_set_max_idle_time (guint interval);
GLIB_AVAILABLE_IN_ALL
guint g_thread_pool_get_max_idle_time (void);
1.2.6 执行一次
GOnce GOnceStatus G_ONCE_INIT g_once g_once_init_enter g_once_init_leave1.2.7 IO类函数
g_io_channel_new_file g_io_channel_read_chars g_io_channel_read_unichar g_io_channel_read_line g_io_channel_read_line_string g_io_channel_read_to_end g_io_channel_write_chars g_io_channel_write_unichar g_io_channel_flush g_io_channel_seek_position GSeekType g_io_channel_shutdown GIOStatus GIOChannelError G_IO_CHANNEL_ERROR g_io_channel_error_from_errno g_io_channel_ref g_io_channel_unref g_io_create_watch g_io_add_watch g_io_add_watch_full GIOCondition GIOFunc g_io_channel_get_buffer_size g_io_channel_set_buffer_size g_io_channel_get_buffer_condition g_io_channel_get_flags g_io_channel_set_flags GIOFlags g_io_channel_get_line_term g_io_channel_set_line_term g_io_channel_get_buffered g_io_channel_set_buffered g_io_channel_get_encoding g_io_channel_set_encoding g_io_channel_get_close_on_unref g_io_channel_set_close_on_unref g_io_channel_read GIOError g_io_channel_write g_io_channel_seek g_io_channel_close1.2.8 内存分配类函数(Memory Allocation)
g_new g_new0 g_renew g_try_new g_try_new0 g_try_renew g_malloc g_malloc0 g_realloc g_try_malloc g_try_malloc0 g_try_realloc g_malloc_n g_malloc0_n g_realloc_n g_try_malloc_n g_try_malloc0_n g_try_realloc_n g_free g_clear_pointer g_steal_pointer g_mem_gc_friendly g_alloca g_alloca0 g_newa g_newa0 g_aligned_alloc g_aligned_alloc0 g_aligned_free g_memmove g_memdup g_memdup21.2.9 Warnings and Assertions类函数
g_print g_set_print_handler GPrintFunc g_printerr g_set_printerr_handler g_return_if_fail g_return_val_if_fail g_return_if_reached g_return_val_if_reached g_warn_if_fail g_warn_if_reached g_on_error_query g_on_error_stack_trace g_return_if_fail_warning g_assert_warning g_warn_message1.2.10 Glob-style pattern matching类函数
GPatternSpec g_pattern_spec_new g_pattern_spec_free g_pattern_spec_equal g_pattern_spec_copy g_pattern_spec_match g_pattern_spec_match_string g_pattern_match g_pattern_match_string g_pattern_match_simple1.2.11 正则表达式类函数
GRegexError G_REGEX_ERROR GRegexCompileFlags GRegexMatchFlags GRegex GRegexEvalCallback g_regex_new g_regex_ref g_regex_unref g_regex_get_pattern g_regex_get_max_backref g_regex_get_capture_count g_regex_get_has_cr_or_lf g_regex_get_max_lookbehind g_regex_get_string_number g_regex_get_compile_flags g_regex_get_match_flags g_regex_escape_string g_regex_escape_nul g_regex_match_simple g_regex_match g_regex_match_full g_regex_match_all g_regex_match_all_full g_regex_split_simple g_regex_split g_regex_split_full g_regex_replace g_regex_replace_literal g_regex_replace_eval g_regex_check_replacement GMatchInfo g_match_info_get_regex g_match_info_get_string g_match_info_ref g_match_info_unref g_match_info_free g_match_info_matches g_match_info_next g_match_info_get_match_count g_match_info_is_partial_match g_match_info_expand_references g_match_info_fetch g_match_info_fetch_pos g_match_info_fetch_named g_match_info_fetch_named_pos g_match_info_fetch_all1.2.13 日志类函数g_regex_error_quark
G_LOG_DOMAIN G_LOG_FATAL_MASK G_LOG_LEVEL_USER_SHIFT GLogFunc GLogLevelFlags g_log g_logv g_message g_warning g_warning_once g_critical g_error g_info g_debug g_log_set_handler g_log_set_handler_full g_log_remove_handler g_log_set_always_fatal g_log_set_fatal_mask g_log_default_handler g_log_set_default_handler g_log_get_debug_enabled g_log_set_debug_enabled g_log_structured g_log_variant GLogField g_log_structured_array G_DEBUG_HERE GLogWriterOutput GLogWriterFunc g_log_set_writer_func g_log_writer_supports_color g_log_writer_is_journald g_log_writer_format_fields g_log_writer_journald g_log_writer_standard_streams g_log_writer_default g_log_writer_default_set_use_stderr g_log_writer_default_would_drop1.2.14 计时器类函数
GTimer g_timer_new g_timer_start g_timer_stop g_timer_continue g_timer_elapsed g_timer_reset g_timer_destroy g_timer_is_active1.2.15 进程类函数
GSpawnError G_SPAWN_ERROR GSpawnFlags GSpawnChildSetupFunc g_spawn_async_with_fds g_spawn_async_with_pipes g_spawn_async_with_pipes_and_fds g_spawn_async g_spawn_sync G_SPAWN_EXIT_ERROR g_spawn_check_wait_status g_spawn_check_exit_status g_spawn_command_line_async g_spawn_command_line_sync g_spawn_close_pid1.2.16 互斥锁类函数(Simple XML Subset Parser)g_spawn_error_quark g_spawn_exit_error_quark
GMarkupError G_MARKUP_ERROR GMarkupParseFlags GMarkupParseContext GMarkupParser g_markup_escape_text g_markup_printf_escaped g_markup_vprintf_escaped g_markup_parse_context_new g_markup_parse_context_parse g_markup_parse_context_end_parse g_markup_parse_context_free g_markup_parse_context_get_position g_markup_parse_context_get_element g_markup_parse_context_get_element_stack g_markup_parse_context_get_user_data g_markup_parse_context_push g_markup_parse_context_pop g_markup_parse_context_ref g_markup_parse_context_unref1.2.17 shell类函数
GShellError G_SHELL_ERROR g_shell_parse_argv g_shell_quote g_shell_unquote 命令行选项 GOptionError G_OPTION_ERROR GOptionArgFunc GOptionContext g_option_context_new g_option_context_set_summary g_option_context_get_summary g_option_context_set_description g_option_context_get_description GTranslateFunc g_option_context_set_translate_func g_option_context_set_translation_domain g_option_context_free g_option_context_parse g_option_context_parse_strv g_option_context_set_help_enabled g_option_context_get_help_enabled g_option_context_set_ignore_unknown_options g_option_context_get_ignore_unknown_options g_option_context_get_help g_option_context_get_strict_posix g_option_context_set_strict_posix GOptionArg GOptionFlags G_OPTION_REMAINING GOptionEntry G_OPTION_ENTRY_NULL g_option_context_add_main_entries GOptionGroup g_option_context_add_group g_option_context_set_main_group g_option_context_get_main_group g_option_group_new g_option_group_ref g_option_group_unref g_option_group_free g_option_group_add_entries GOptionParseFunc g_option_group_set_parse_hooks GOptionErrorFunc g_option_group_set_error_hook g_option_group_set_translate_func g_option_group_set_translation_domain1.2.18 日期类函数g_option_error_quark 文件类 GFileError G_FILE_ERROR GFileTest g_file_error_from_errno g_file_get_contents GFileSetContentsFlags g_file_set_contents g_file_set_contents_full g_file_test g_mkstemp g_mkstemp_full g_file_open_tmp g_file_read_link g_mkdir_with_parents g_mkdtemp g_mkdtemp_full g_dir_make_tmp GDir g_dir_open g_dir_read_name g_dir_rewind g_dir_close GMappedFile g_mapped_file_new g_mapped_file_new_from_fd g_mapped_file_ref g_mapped_file_unref g_mapped_file_free g_mapped_file_get_length g_mapped_file_get_contents g_mapped_file_get_bytes g_open g_rename g_mkdir GStatBuf g_stat g_lstat g_unlink g_remove g_rmdir g_fopen g_freopen g_fsync g_chmod g_access g_creat g_chdir g_utime g_close 字符串类 g_strdup g_strndup g_strdupv g_strnfill g_stpcpy g_strstr_len g_strrstr g_strrstr_len g_str_has_prefix g_str_has_suffix g_strcmp0 g_str_to_ascii g_str_tokenize_and_fold g_str_match_string g_strdup_printf g_strdup_vprintf g_printf g_vprintf g_fprintf g_vfprintf g_sprintf g_vsprintf g_snprintf g_vsnprintf g_vasprintf g_printf_string_upper_bound 编码类 g_str_is_ascii g_ascii_isalnum g_ascii_isalpha g_ascii_iscntrl g_ascii_isdigit g_ascii_isgraph g_ascii_islower g_ascii_isprint g_ascii_ispunct g_ascii_isspace g_ascii_isupper g_ascii_isxdigit g_ascii_digit_value g_ascii_xdigit_value g_ascii_strcasecmp g_ascii_strncasecmp g_ascii_strup g_ascii_strdown g_strdelimit G_STR_DELIMITERS g_strescape g_strcompress g_strcanon g_strsplit g_strsplit_set g_strfreev g_strconcat g_strjoin g_strjoinv GStrv GStrvBuilder g_strv_length g_strv_contains g_strv_equal g_strv_builder_new g_strv_builder_ref g_strv_builder_unref g_strv_builder_add g_strv_builder_addv g_strv_builder_add_many g_strv_builder_end
GDate GTime GDateDMY GDateDay GDateMonth GDateYear GDateWeekday G_DATE_BAD_DAY G_DATE_BAD_JULIAN G_DATE_BAD_YEAR g_date_new g_date_new_dmy g_date_new_julian g_date_clear g_date_free g_date_copy g_date_set_day g_date_set_month g_date_set_year g_date_set_dmy g_date_set_julian g_date_set_time g_date_set_time_t g_date_set_time_val g_date_set_parse g_date_add_days g_date_subtract_days g_date_add_months g_date_subtract_months g_date_add_years g_date_subtract_years g_date_days_between g_date_compare g_date_clamp g_date_order1.2.19 互斥锁类函数
GHookList GHookFinalizeFunc GHook GHookFunc GHookCheckFunc g_hook_list_init g_hook_list_invoke g_hook_list_invoke_check g_hook_list_marshal GHookMarshaller g_hook_list_marshal_check GHookCheckMarshaller g_hook_list_clear g_hook_alloc g_hook_append g_hook_prepend g_hook_insert_before g_hook_insert_sorted GHookCompareFunc g_hook_compare_ids g_hook_get g_hook_find GHookFindFunc g_hook_find_data g_hook_find_func g_hook_find_func_data1.2.20 用户类函数
g_get_application_name g_set_application_name g_get_prgname g_set_prgname g_get_environ g_environ_getenv g_environ_setenv g_environ_unsetenv g_getenv g_setenv g_unsetenv g_listenv g_get_user_name g_get_real_name g_get_user_cache_dir g_get_user_data_dir g_get_user_config_dir g_get_user_state_dir g_get_user_runtime_dir GUserDirectory g_get_user_special_dir g_get_system_data_dirs g_get_system_config_dirs g_reload_user_special_dirs_cache g_get_os_info g_get_host_name g_get_home_dir g_get_tmp_dir g_get_current_dir g_basename g_dirname g_canonicalize_filename g_path_is_absolute g_path_skip_root g_path_get_basename g_path_get_dirname g_build_filename g_build_filenamev g_build_filename_valist g_build_path g_build_pathv g_atexit g_abort1.2.21 Scanner类函数
GScanner GScannerConfig g_scanner_new g_scanner_destroy1.2.22 Key-value file parser类函数g_scanner_input_file g_scanner_sync_file_offset g_scanner_input_text g_scanner_peek_next_token g_scanner_get_next_token g_scanner_eof g_scanner_cur_line g_scanner_cur_position g_scanner_cur_token g_scanner_cur_value g_scanner_set_scope g_scanner_scope_add_symbol g_scanner_scope_foreach_symbol g_scanner_scope_lookup_symbol g_scanner_scope_remove_symbol g_scanner_add_symbol g_scanner_remove_symbol g_scanner_foreach_symbol g_scanner_freeze_symbol_table g_scanner_thaw_symbol_table g_scanner_lookup_symbol g_scanner_warn g_scanner_error g_scanner_unexp_token GScannerMsgFunc
GKeyFile G_KEY_FILE_ERROR GKeyFileError GKeyFileFlags g_key_file_new g_key_file_free g_key_file_ref g_key_file_unref g_key_file_set_list_separator g_key_file_load_from_file g_key_file_load_from_data g_key_file_load_from_bytes g_key_file_load_from_data_dirs g_key_file_load_from_dirs g_key_file_to_data g_key_file_save_to_file g_key_file_get_start_group g_key_file_get_groups g_key_file_get_keys g_key_file_has_group g_key_file_has_key g_key_file_get_value g_key_file_get_string g_key_file_get_locale_string g_key_file_get_locale_for_key g_key_file_get_boolean g_key_file_get_integer g_key_file_get_int64 g_key_file_get_uint64 g_key_file_get_double g_key_file_get_string_list g_key_file_get_locale_string_list g_key_file_get_boolean_list g_key_file_get_integer_list g_key_file_get_double_list g_key_file_get_comment g_key_file_set_value g_key_file_set_string g_key_file_set_locale_string g_key_file_set_boolean g_key_file_set_integer g_key_file_set_int64 g_key_file_set_uint64 g_key_file_set_double g_key_file_set_string_list g_key_file_set_locale_string_list g_key_file_set_boolean_list g_key_file_set_integer_list g_key_file_set_double_list g_key_file_set_comment g_key_file_remove_group g_key_file_remove_key g_key_file_remove_comment1.2.23 Bookmark file parser类函数
GBookmarkFile G_BOOKMARK_FILE_ERROR GBookmarkFileError g_bookmark_file_new g_bookmark_file_free g_bookmark_file_load_from_file g_bookmark_file_load_from_data g_bookmark_file_load_from_data_dirs g_bookmark_file_to_data g_bookmark_file_to_file g_bookmark_file_has_item g_bookmark_file_has_group g_bookmark_file_has_application g_bookmark_file_get_size g_bookmark_file_get_uris G_GNUC_MALLOC g_bookmark_file_get_title g_bookmark_file_get_description g_bookmark_file_get_mime_type g_bookmark_file_get_is_private g_bookmark_file_get_icon g_bookmark_file_get_added g_bookmark_file_get_added_date_time g_bookmark_file_get_modified g_bookmark_file_get_modified_date_time g_bookmark_file_get_visited g_bookmark_file_get_visited_date_time g_bookmark_file_get_groups g_bookmark_file_get_applications g_bookmark_file_get_app_info g_bookmark_file_get_application_info g_bookmark_file_set_title g_bookmark_file_set_description g_bookmark_file_set_mime_type g_bookmark_file_set_is_private g_bookmark_file_set_icon g_bookmark_file_set_added g_bookmark_file_set_added_date_time g_bookmark_file_set_groups g_bookmark_file_set_modified g_bookmark_file_set_modified_date_time g_bookmark_file_set_visited g_bookmark_file_set_visited_date_time g_bookmark_file_set_app_info g_bookmark_file_set_application_info g_bookmark_file_add_group g_bookmark_file_add_application g_bookmark_file_remove_group g_bookmark_file_remove_application g_bookmark_file_remove_item g_bookmark_file_move_item1.2.24 Dynamic Loading of Modules类函数
GModule GModuleError G_MODULE_ERROR g_module_supported g_module_build_path g_module_open g_module_open_full GModuleFlags g_module_symbol g_module_name g_module_make_resident g_module_close g_module_error GModuleCheckInit GModuleUnload G_MODULE_SUFFIX G_MODULE_EXPORT G_MODULE_IMPORT1.2.25 双向链表类函数
g_list_append g_list_prepend g_list_insert g_list_insert_before g_list_insert_before_link g_list_insert_sorted g_list_remove g_list_remove_link g_list_delete_link g_list_remove_all g_list_free g_list_free_full g_clear_list g_list_alloc g_list_free_1 g_list_free1 g_list_length g_list_copy g_list_copy_deep g_list_reverse g_list_sort GCompareFunc g_list_insert_sorted_with_data g_list_sort_with_data GCompareDataFunc g_list_concat g_list_foreach g_list_first g_list_last g_list_previous g_list_next g_list_nth g_list_nth_data g_list_nth_prev g_list_find g_list_find_custom g_list_position g_list_index1.2.26 单向链表类函数
g_slist_alloc g_slist_append g_slist_prepend g_slist_insert g_slist_insert_before g_slist_insert_sorted g_slist_remove g_slist_remove_link g_slist_delete_link g_slist_remove_all g_slist_free g_slist_free_full g_slist_free_1 g_slist_free1 g_clear_slist g_slist_length g_slist_copy g_slist_copy_deep g_slist_reverse g_slist_insert_sorted_with_data g_slist_sort g_slist_sort_with_data g_slist_concat g_slist_foreach g_slist_last g_slist_next g_slist_nth g_slist_nth_data g_slist_find g_slist_find_custom g_slist_position g_slist_index1.2.27 双头队列类函数
g_queue_new g_queue_free g_queue_free_full G_QUEUE_INIT g_queue_init g_queue_clear g_queue_clear_full g_queue_is_empty g_queue_get_length g_queue_reverse g_queue_copy g_queue_foreach g_queue_find g_queue_find_custom g_queue_sort g_queue_push_head g_queue_push_tail g_queue_push_nth g_queue_pop_head g_queue_pop_tail g_queue_pop_nth g_queue_peek_head g_queue_peek_tail g_queue_peek_nth g_queue_index g_queue_remove g_queue_remove_all g_queue_insert_before g_queue_insert_before_link g_queue_insert_after g_queue_insert_after_link g_queue_insert_sorted g_queue_push_head_link g_queue_push_tail_link g_queue_push_nth_link g_queue_pop_head_link g_queue_pop_tail_link g_queue_pop_nth_link g_queue_peek_head_link g_queue_peek_tail_link g_queue_peek_nth_link g_queue_link_index g_queue_unlink g_queue_delete_link1.2.28 单头队列类函数
GSequence GSequenceIter GSequenceIterCompareFunc1.2.29 栈类函数g_sequence_new g_sequence_free g_sequence_get_length g_sequence_is_empty g_sequence_foreach g_sequence_foreach_range g_sequence_sort g_sequence_sort_iter g_sequence_get_begin_iter g_sequence_get_end_iter g_sequence_get_iter_at_pos g_sequence_append g_sequence_prepend g_sequence_insert_before g_sequence_move g_sequence_swap g_sequence_insert_sorted g_sequence_insert_sorted_iter g_sequence_sort_changed g_sequence_sort_changed_iter g_sequence_remove g_sequence_remove_range g_sequence_move_range g_sequence_search g_sequence_search_iter g_sequence_lookup g_sequence_lookup_iter g_sequence_get g_sequence_set g_sequence_iter_is_begin g_sequence_iter_is_end g_sequence_iter_next g_sequence_iter_prev g_sequence_iter_get_position g_sequence_iter_move g_sequence_iter_get_sequence
GTrashStack g_trash_stack_push g_trash_stack_pop g_trash_stack_peek g_trash_stack_height1.2.30 哈希类函数
GHashTable g_hash_table_new g_hash_table_new_full g_hash_table_new_similar GHashFunc GEqualFunc GEqualFuncFull g_hash_table_insert g_hash_table_replace g_hash_table_add g_hash_table_contains g_hash_table_size g_hash_table_lookup g_hash_table_lookup_extended g_hash_table_foreach g_hash_table_find GHFunc g_hash_table_remove g_hash_table_steal g_hash_table_steal_extended g_hash_table_foreach_remove g_hash_table_foreach_steal g_hash_table_remove_all g_hash_table_steal_all g_hash_table_get_keys g_hash_table_get_values g_hash_table_get_keys_as_array GHRFunc g_hash_table_freeze g_hash_table_thaw g_hash_table_destroy g_hash_table_ref g_hash_table_unref GHashTableIter g_hash_table_iter_init g_hash_table_iter_next g_hash_table_iter_get_hash_table g_hash_table_iter_replace g_hash_table_iter_remove g_hash_table_iter_steal g_direct_equal g_direct_hash g_int_equal g_int_hash g_int64_equal g_int64_hash g_double_equal g_double_hash g_str_equal g_str_hash1.2.31 字符串类函数
GString g_string_new g_string_new_len g_string_sized_new g_string_assign g_string_sprintf g_string_sprintfa g_string_vprintf g_string_append_vprintf g_string_printf g_string_append_printf g_string_append g_string_append_c g_string_append_unichar g_string_append_len g_string_append_uri_escaped g_string_prepend g_string_prepend_c g_string_prepend_unichar g_string_prepend_len g_string_insert g_string_insert_c g_string_insert_unichar g_string_insert_len g_string_overwrite g_string_overwrite_len g_string_replace g_string_erase g_string_truncate g_string_set_size g_string_free g_string_free_to_bytes1.2.32 字符串块类函数
GStringChunk g_string_chunk_new g_string_chunk_insert g_string_chunk_insert_const g_string_chunk_insert_len g_string_chunk_clear g_string_chunk_free1.2.33 Arrays类函数
GArray g_array_new g_array_steal g_array_sized_new g_array_copy g_array_ref g_array_unref g_array_get_element_size g_array_append_val g_array_append_vals g_array_prepend_val g_array_prepend_vals g_array_insert_val g_array_insert_vals g_array_remove_index g_array_remove_index_fast g_array_remove_range g_array_sort g_array_sort_with_data g_array_binary_search g_array_index g_array_set_size g_array_set_clear_func g_array_free1.2.34 指针数组类函数
GPtrArray g_ptr_array_new g_ptr_array_steal g_ptr_array_sized_new g_ptr_array_new_with_free_func g_ptr_array_copy g_ptr_array_new_full g_ptr_array_set_free_func g_ptr_array_ref g_ptr_array_unref g_ptr_array_add g_ptr_array_extend g_ptr_array_extend_and_steal g_ptr_array_insert g_ptr_array_remove g_ptr_array_remove_index g_ptr_array_remove_fast g_ptr_array_remove_index_fast g_ptr_array_remove_range g_ptr_array_steal_index g_ptr_array_steal_index_fast g_ptr_array_sort g_ptr_array_sort_with_data g_ptr_array_set_size g_ptr_array_index g_ptr_array_free g_ptr_array_foreach g_ptr_array_find g_ptr_array_find_with_equal_func1.2.35 Byte Arrays类函数
GByteArray g_byte_array_new g_byte_array_steal g_byte_array_new_take g_byte_array_sized_new g_byte_array_ref g_byte_array_unref g_byte_array_append g_byte_array_prepend g_byte_array_remove_index g_byte_array_remove_index_fast g_byte_array_remove_range g_byte_array_sort g_byte_array_sort_with_data g_byte_array_set_size g_byte_array_free g_byte_array_free_to_bytes1.2.36 Byte类函数
GBytes g_bytes_new g_bytes_new_take g_bytes_new_static g_bytes_new_with_free_func g_bytes_new_from_bytes g_bytes_get_data g_bytes_get_region g_bytes_get_size g_bytes_hash g_bytes_equal g_bytes_compare g_bytes_ref g_bytes_unref g_bytes_unref_to_data g_bytes_unref_to_array1.2.37 Tree类函数
GTree GTreeNode g_tree_new g_tree_ref g_tree_unref g_tree_new_with_data g_tree_new_full g_tree_node_first g_tree_node_last g_tree_node_previous g_tree_node_next g_tree_insert_node g_tree_insert g_tree_replace_node g_tree_replace g_tree_node_key g_tree_node_value g_tree_nnodes g_tree_height g_tree_lookup_node g_tree_lookup g_tree_lookup_extended g_tree_foreach_node g_tree_foreach g_tree_traverse GTraverseFunc GTraverseNodeFunc g_tree_search_node g_tree_search g_tree_lower_bound g_tree_upper_bound g_tree_remove g_tree_steal g_tree_remove_all g_tree_destroy1.2.38 N-ary Trees类函数
GNode g_node_new g_node_copy GCopyFunc g_node_copy_deep1.2.39 Quarks类函数g_node_insert g_node_insert_before g_node_insert_after g_node_append g_node_prepend g_node_insert_data g_node_insert_data_after g_node_insert_data_before g_node_append_data g_node_prepend_data g_node_reverse_children g_node_traverse GTraverseType GTraverseFlags GNodeTraverseFunc g_node_children_foreach GNodeForeachFunc g_node_get_root g_node_find g_node_find_child g_node_child_index g_node_child_position g_node_first_child g_node_last_child g_node_nth_child g_node_first_sibling g_node_next_sibling g_node_prev_sibling g_node_last_sibling G_NODE_IS_LEAF G_NODE_IS_ROOT g_node_depth g_node_n_nodes g_node_n_children g_node_is_ancestor g_node_max_height
GQuark G_DEFINE_QUARK g_quark_from_string g_quark_from_static_string g_quark_to_string g_quark_try_string g_intern_string g_intern_static_string1.2.40 datalist类函数
g_datalist_id_set_data g_datalist_id_set_data_full g_datalist_id_get_data g_datalist_id_remove_data g_datalist_id_remove_no_notify GDuplicateFunc g_datalist_id_dup_data g_datalist_id_replace_data1.2.41 Datasets类函数g_datalist_set_data g_datalist_set_data_full g_datalist_get_data g_datalist_remove_data g_datalist_remove_no_notify g_datalist_foreach g_datalist_clear g_datalist_set_flags g_datalist_unset_flags g_datalist_get_flags G_DATALIST_FLAGS_MASK
g_dataset_id_set_data g_dataset_id_set_data_full GDestroyNotify g_dataset_id_get_data g_dataset_id_remove_data g_dataset_id_remove_no_notify1.2.42 Tuples类函数g_dataset_set_data g_dataset_set_data_full g_dataset_get_data g_dataset_remove_data g_dataset_remove_no_notify g_dataset_foreach GDataForeachFunc g_dataset_destroy
GRelation g_relation_new g_relation_index g_relation_insert g_relation_exists g_relation_count g_relation_select g_relation_delete g_relation_destroy1.2.43 Caches类函数
GCache g_cache_new g_cache_insert g_cache_remove g_cache_destroy g_cache_key_foreach g_cache_value_foreach GCacheDestroyFunc GCacheDupFunc GCacheNewFunc1.2.44 Random类函数
GRand g_rand_new_with_seed g_rand_new_with_seed_array g_rand_new g_rand_copy g_rand_free g_rand_set_seed g_rand_set_seed_array g_rand_boolean g_rand_int g_rand_int_range g_rand_double g_rand_double_range g_random_set_seed g_random_boolean g_random_int g_random_int_range g_random_double g_random_double_range1.2.45 Character Set Conversion类函数
g_convert g_convert_with_fallback GIConv g_convert_with_iconv G_CONVERT_ERROR g_iconv_open g_iconv g_iconv_close g_locale_to_utf8 g_filename_to_utf8 g_filename_from_utf8 g_get_filename_charsets g_filename_display_name g_filename_display_basename g_locale_from_utf81.2.46 Unicode Manipulation类函数
g_unichar_validate g_unichar_isalnum g_unichar_isalpha g_unichar_iscntrl g_unichar_isdefined g_unichar_isdigit g_unichar_isgraph g_unichar_islower g_unichar_ismark g_unichar_isprint g_unichar_ispunct g_unichar_isspace g_unichar_istitle g_unichar_isupper g_unichar_isxdigit g_unichar_iswide g_unichar_iswide_cjk g_unichar_iszerowidth g_unichar_toupper g_unichar_tolower g_unichar_totitle g_unichar_digit_value g_unichar_xdigit_value g_unichar_compose g_unichar_decompose g_unichar_fully_decompose G_UNICHAR_MAX_DECOMPOSITION_LENGTH GUnicodeType G_UNICODE_COMBINING_MARK g_unichar_type GUnicodeBreakType g_unichar_break_type g_unichar_combining_class g_unicode_canonical_ordering g_unicode_canonical_decomposition g_unichar_get_mirror_char GUnicodeScript g_unichar_get_script g_unicode_script_from_iso15924 g_unicode_script_to_iso159241.2.47 Base64 Encoding类函数g_utf8_next_char g_utf8_get_char g_utf8_get_char_validated g_utf8_offset_to_pointer g_utf8_pointer_to_offset g_utf8_prev_char g_utf8_find_next_char g_utf8_find_prev_char g_utf8_strlen g_utf8_strncpy g_utf8_strchr g_utf8_strrchr g_utf8_strreverse g_utf8_substring g_utf8_validate g_utf8_validate_len g_utf8_make_valid g_utf8_strup g_utf8_strdown g_utf8_casefold g_utf8_normalize GNormalizeMode g_utf8_collate g_utf8_collate_key g_utf8_collate_key_for_filename g_utf8_to_utf16 g_utf8_to_ucs4 g_utf8_to_ucs4_fast g_utf16_to_ucs4 g_utf16_to_utf8 g_ucs4_to_utf16 g_ucs4_to_utf8 g_unichar_to_utf8
g_base64_encode_step g_base64_encode_close g_base64_encode g_base64_decode_step g_base64_decode g_base64_decode_inplace1.2.48 URI Functions类函数
GUri g_uri_ref g_uri_unref1.2.49 Data Checksums类函数(校验和)GUriFlags g_uri_split g_uri_split_with_user g_uri_split_network g_uri_is_valid g_uri_join g_uri_join_with_user g_uri_parse g_uri_parse_relative g_uri_resolve_relative g_uri_build g_uri_build_with_user g_uri_peek_scheme g_uri_parse_scheme GUriHideFlags g_uri_to_string g_uri_to_string_partial g_uri_get_scheme g_uri_get_userinfo g_uri_get_user g_uri_get_password g_uri_get_auth_params g_uri_get_host g_uri_get_port g_uri_get_path g_uri_get_query g_uri_get_fragment g_uri_get_flags GUriParamsIter GUriParamsFlags g_uri_params_iter_init g_uri_params_iter_next g_uri_parse_params G_URI_RESERVED_CHARS_ALLOWED_IN_PATH G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO G_URI_RESERVED_CHARS_GENERIC_DELIMITERS G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS g_uri_escape_string g_uri_unescape_string g_uri_escape_bytes g_uri_unescape_bytes g_uri_unescape_segment g_uri_list_extract_uris g_filename_from_uri g_filename_to_uri G_URI_ERROR GUriError g_uri_error_quark
GChecksumType g_checksum_type_get_length GChecksum g_checksum_new g_checksum_copy g_checksum_free g_checksum_reset g_checksum_update g_checksum_get_string g_checksum_get_digest1.2.50 Data HMACs类函数(加密)g_compute_checksum_for_data g_compute_checksum_for_string g_compute_checksum_for_bytes
GHmac g_hmac_new g_hmac_copy g_hmac_ref g_hmac_unref g_hmac_update g_hmac_get_string g_hmac_get_digest1.2.51 Testing类函数g_compute_hmac_for_data g_compute_hmac_for_string g_compute_hmac_for_bytes
G_TEST_OPTION_ISOLATE_DIRS g_test_minimized_result g_test_maximized_result g_test_init g_test_initialized g_test_quick g_test_slow g_test_thorough g_test_perf g_test_verbose g_test_undefined g_test_quiet g_test_subprocess g_test_run GTestFunc g_test_add_func GTestDataFunc g_test_add_data_func g_test_add_data_func_full g_test_add g_test_get_path GTestFileType g_test_build_filename g_test_get_filename g_test_get_dir g_test_fail g_test_fail_printf g_test_skip g_test_skip_printf g_test_incomplete g_test_incomplete_printf g_test_failed g_test_message g_test_bug_base g_test_bug g_test_summary GTestLogFatalFunc g_test_log_set_fatal_handler g_test_timer_start g_test_timer_elapsed g_test_timer_last g_test_queue_free g_test_queue_destroy g_test_queue_unref g_test_expect_message g_test_assert_expected_messages GTestTrapFlags GTestSubprocessFlags g_test_trap_subprocess g_test_trap_has_passed g_test_trap_reached_timeout g_test_trap_assert_passed g_test_trap_assert_failed g_test_trap_assert_stdout g_test_trap_assert_stdout_unmatched g_test_trap_assert_stderr g_test_trap_assert_stderr_unmatched g_test_trap_fork g_test_rand_bit g_test_rand_int g_test_rand_int_range g_test_rand_double g_test_rand_double_range g_assert g_assert_not_reached g_assert_cmpstr g_assert_cmpstrv g_assert_cmpint g_assert_cmpuint g_assert_cmphex g_assert_cmpfloat g_assert_cmpfloat_with_epsilon g_assert_cmpmem g_assert_cmpvariant g_assert_no_error g_assert_error g_assert_true g_assert_false g_assert_null g_assert_nonnull g_assert_no_errno g_test_set_nonfatal_assertions GTestCase GTestSuite GTestFixtureFunc g_test_create_case g_test_create_suite g_test_get_root g_test_suite_add g_test_suite_add_suite g_test_run_suite g_test_case_free g_test_suite_free1.2.52 GVariantType类函数g_test_trap_assertions g_assertion_message g_assertion_message_expr g_assertion_message_cmpstr g_assertion_message_cmpnum g_assertion_message_error g_test_assert_expected_messages_internal g_test_config_vars g_test_add_vtable GTestConfig GTestLogType GTestLogMsg GTestLogBuffer GTestResult g_test_log_type_name g_test_log_buffer_new g_test_log_buffer_free g_test_log_buffer_push g_test_log_buffer_pop g_test_log_msg_free
GVariantType G_VARIANT_TYPE_BOOLEAN G_VARIANT_TYPE_BYTE G_VARIANT_TYPE_INT16 G_VARIANT_TYPE_UINT16 G_VARIANT_TYPE_INT32 G_VARIANT_TYPE_UINT32 G_VARIANT_TYPE_INT64 G_VARIANT_TYPE_UINT64 G_VARIANT_TYPE_HANDLE G_VARIANT_TYPE_DOUBLE G_VARIANT_TYPE_STRING G_VARIANT_TYPE_OBJECT_PATH G_VARIANT_TYPE_SIGNATURE G_VARIANT_TYPE_VARIANT G_VARIANT_TYPE_ANY G_VARIANT_TYPE_BASIC G_VARIANT_TYPE_MAYBE G_VARIANT_TYPE_ARRAY G_VARIANT_TYPE_TUPLE G_VARIANT_TYPE_UNIT G_VARIANT_TYPE_DICT_ENTRY G_VARIANT_TYPE_DICTIONARY G_VARIANT_TYPE_STRING_ARRAY G_VARIANT_TYPE_OBJECT_PATH_ARRAY G_VARIANT_TYPE_BYTESTRING G_VARIANT_TYPE_BYTESTRING_ARRAY G_VARIANT_TYPE_VARDICT1.2.53 ghostutils类函数G_VARIANT_TYPE g_variant_type_free g_variant_type_copy g_variant_type_new g_variant_type_string_is_valid g_variant_type_string_scan g_variant_type_get_string_length g_variant_type_peek_string g_variant_type_dup_string g_variant_type_is_definite g_variant_type_is_container g_variant_type_is_basic g_variant_type_is_maybe g_variant_type_is_array g_variant_type_is_tuple g_variant_type_is_dict_entry g_variant_type_is_variant g_variant_type_hash g_variant_type_equal g_variant_type_is_subtype_of g_variant_type_new_maybe g_variant_type_new_array g_variant_type_new_tuple g_variant_type_new_dict_entry g_variant_type_element g_variant_type_n_items g_variant_type_first g_variant_type_next g_variant_type_key g_variant_type_value GVariant gvariant GVariant g_variant_unref g_variant_ref g_variant_ref_sink g_variant_is_floating g_variant_take_ref g_variant_get_type g_variant_get_type_string g_variant_is_of_type g_variant_is_container g_variant_compareg_variant_classify GVariantClass g_variant_check_format_string g_variant_get g_variant_get_va g_variant_new g_variant_new_va g_variant_new_boolean g_variant_new_byte g_variant_new_int16 g_variant_new_uint16 g_variant_new_int32 g_variant_new_uint32 g_variant_new_int64 g_variant_new_uint64 g_variant_new_handle g_variant_new_double g_variant_new_string g_variant_new_take_string g_variant_new_printf g_variant_new_object_path g_variant_is_object_path g_variant_new_signature g_variant_is_signature g_variant_new_variant g_variant_new_strv g_variant_new_objv g_variant_new_bytestring g_variant_new_bytestring_array g_variant_get_boolean g_variant_get_byte g_variant_get_int16 g_variant_get_uint16 g_variant_get_int32 g_variant_get_uint32 g_variant_get_int64 g_variant_get_uint64 g_variant_get_handle g_variant_get_double g_variant_get_string g_variant_dup_string g_variant_get_variant g_variant_get_strv g_variant_dup_strv g_variant_get_objv g_variant_dup_objv g_variant_get_bytestring g_variant_dup_bytestring g_variant_get_bytestring_array g_variant_dup_bytestring_array g_variant_new_maybe g_variant_new_array g_variant_new_tuple g_variant_new_dict_entry g_variant_new_fixed_array g_variant_get_maybe g_variant_n_children g_variant_get_child_value g_variant_get_child g_variant_lookup_value g_variant_lookup g_variant_get_fixed_array g_variant_get_size g_variant_get_data g_variant_get_data_as_bytes g_variant_store g_variant_new_from_data g_variant_new_from_bytes g_variant_byteswap g_variant_get_normal_form g_variant_is_normal_form g_variant_hash g_variant_equal g_variant_print g_variant_print_string GVariantIter g_variant_iter_copy g_variant_iter_free g_variant_iter_init g_variant_iter_n_children g_variant_iter_new g_variant_iter_next_value g_variant_iter_next g_variant_iter_loop G_VARIANT_BUILDER_INIT GVariantBuilder g_variant_builder_unref g_variant_builder_ref g_variant_builder_new g_variant_builder_init g_variant_builder_clear g_variant_builder_add_value g_variant_builder_add g_variant_builder_add_parsed g_variant_builder_end g_variant_builder_open g_variant_builder_close G_VARIANT_DICT_INIT GVariantDict g_variant_dict_unref g_variant_dict_ref g_variant_dict_new g_variant_dict_init g_variant_dict_clear g_variant_dict_contains g_variant_dict_lookup g_variant_dict_lookup_value g_variant_dict_insert g_variant_dict_insert_value g_variant_dict_remove g_variant_dict_end GVariantParseError G_VARIANT_PARSE_ERROR g_variant_parse g_variant_new_parsed_va g_variant_new_parsed g_variant_parse_error_print_context g_variant_parse_error_quark g_variant_parser_get_error_quark g_variant_type_checked_ g_variant_type_string_get_depth_
g_hostname_to_ascii g_hostname_to_unicode1.2.54 uuid类函数g_hostname_is_non_ascii g_hostname_is_ascii_encoded g_hostname_is_ip_address
g_uuid_string_is_valid g_uuid_string_random1.2.55 refcount类函数(引用计数器)
grefcount g_ref_count_init g_ref_count_inc g_ref_count_dec g_ref_count_compare1.2.56 rcbox类函数gatomicrefcount g_atomic_ref_count_init g_atomic_ref_count_inc g_atomic_ref_count_dec
g_rc_box_alloc g_rc_box_alloc0 g_rc_box_new g_rc_box_new0 g_rc_box_dup g_rc_box_acquire g_rc_box_release g_rc_box_release_full g_rc_box_get_size1.2.57 arcbox类函数
g_atomic_rc_box_alloc g_atomic_rc_box_alloc0 g_atomic_rc_box_new g_atomic_rc_box_new0 g_atomic_rc_box_dup g_atomic_rc_box_acquire g_atomic_rc_box_release g_atomic_rc_box_release_full g_atomic_rc_box_get_size1.2.58 refstring类函数
GRefString g_ref_string_new g_ref_string_new_intern g_ref_string_new_len g_ref_string_acquire g_ref_string_release g_ref_string_length二、gio
(略)
三、gobject 三、meson管理


