
GLIB(GNOME)
CaspianSea
这个作者很懒,什么都没留下…
展开
-
GLIB main event loop
下面是一个小程序,其实是一个简单的事件触发模型:#include #include #include GMainLoop *loop;gboolean callback(GIOChannel *channel){ gchar *str; gsize len; /*stdin*/ g_io_channel_read_line(channel, &st原创 2015-05-26 03:06:06 · 1225 阅读 · 0 评论 -
Using GIOChannel
http://www.symlab.org/main/documentation/reference/s3/pdk/GUID-817C43E8-9169-4750-818B-B431D138D71A.htmlGIOChannel provides a portable method for using file descriptors,sockets and pipes and int转载 2015-05-26 03:26:02 · 1316 阅读 · 0 评论 -
GLib 创建自定义事件源
GLib 实现了一个功能强大的事件循环分发处理机制,被抽象成为 GMainLoop,用于循环处理事件源上的事件。每个 GMainLoop 都工作在指定的 GMainContext 上。事件源在 GLib 中则被抽象成了 GSource。在 GMainContext 中有一个 GSource 列表。GLib 内部定义实现了三种类型的事件源,分别是 Idle, Timeout 和 I/O。同时也支持创转载 2015-09-28 02:05:06 · 927 阅读 · 0 评论 -
GVariant Format Strings
Variable Argument ConversionsThis page attempts to document how to perform variable argument conversions with GVariant.Conversions occur according to format strings. A format string is a two-way转载 2016-05-18 01:34:56 · 5203 阅读 · 1 评论 -
write DBUS Services (I)
Those days I had to make a D-Bus server and client in python and I thought to share with you guys some things about the D-Bus.First of all, what is D-Bus? Well, D-Bus is a system that offers a commu转载 2017-04-09 09:18:29 · 665 阅读 · 0 评论 -
write DBUS Services (II)
For the system bus server you would need only to modify line 13 from the sessionbus server and line 7 from the client scripts; to replace SessionBus() with SystemBus(). Let’s also change the names f转载 2017-04-09 10:32:50 · 596 阅读 · 0 评论 -
DBus services
The message bus can start applications (services) on behalf of other applications, the application asks DBus to start a service by its name, usually the name should be known such as org.freedesktop.Te转载 2014-11-16 01:51:01 · 2102 阅读 · 0 评论 -
GLib Event Loop
GLibEvent LoopThe GLib event loop manages all the sources of an event availablefor GLib. These events can come from different kinds of sources like filedescriptors (plain file descriptors, sockets, or...转载 2018-05-24 07:02:08 · 575 阅读 · 0 评论