![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
glib学习
文章平均质量分 77
marlinnie
这个作者很懒,什么都没留下…
展开
-
glib学习-- timer使用
如果之让定时器执行一次,回调函数返回false,如果返回true,会定时执行。#include #include #include #include #define true 1#define false 0int id = 0;gboolean service_send_change(gpointer data){id转载 2016-07-26 10:45:25 · 1431 阅读 · 0 评论 -
Glib事件源
GLib 实现了一个功能强大的事件循环分发处理机制,GLib 内部实现了三种类型的事件源,分别是 Timeout, Idle, Child Watch。同时也支持创建自定义的事件源——也就是添加child watch李先静老师的FTK就是仿照glib的事件源来实现的1. Timeout事件源//mainloop1.c#include GMainLoop*转载 2016-07-26 11:35:22 · 579 阅读 · 0 评论 -
glib 中 IO Channels 理解
G_IO_INThere is data to read.G_IO_OUTData can be written (without blocking).G_IO_PRIThere is urgent data to read.G_IO_ERRError condition.G_IO_HUPHung up (the connecti转载 2016-07-26 11:52:22 · 1244 阅读 · 0 评论