[glib-reference] dispatching with g_source_attach()?



Hi all,

I've been translated "glib reference manual" for glib-2.2.x to Japanese,
then I found a description for dispatching in section "The Main Event Loop" 
which might be wrong with a function g_source_attach() like;

 glib/docs/reference/glib/tmpl/main.sgml:733
  728 <entry>dispatch</entry>
  729 <entry>
  730 Called to dispatch the event source, after it has returned %TRUE in
  731 either its @prepare or its @check function. The @dispatch function is
  732 passed in a callback function and data. The callback function may be
  733 %NULL if the source was never connected using g_source_attach(). The
  734 @dispatch function should call the callback function with data and
  735 whatever additional parameters are needed for this type of event source.
  736 </entry>

In "if the source was never connected using g_source_attach()...",
I guessed "... using g_source_set_callback()..." is correct.
This function "g_source_attach()" try to add a context to event source, not
set a callback function.
While, function "g_source_set_callback()" can set callback function to
event source, which is waked up in dispatching phase.
My construction is wrong?

Thanks for your advices.
Regards, 
---
(TAKESHI)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]