GMainLoop               package:RGtk2               R Documentation

_T_h_e _G_L_i_b _M_a_i_n _L_o_o_p

_D_e_s_c_r_i_p_t_i_o_n:

     GLib provides an event-loop to all GLib-based libraries and
     applications. RGtk2 is one such library.

_U_s_a_g_e:

     gTimeoutAdd(interval, f, data = NULL)
     gIdleAdd(f, data = NULL)
     gSourceRemove(id)

_A_r_g_u_m_e_n_t_s:

interval: The time interval which determines the frequency of the
          handler call

       f: An R function that is called by the loop

    data: Any R object that is passed to the R function as the last
          parameter

      id: The source id obtained when adding a handler

_D_e_t_a_i_l_s:

     The RGtk2 user has limited control over the event loop, but it
     still possible to  register handlers as either timeout or idle
     tasks. A handler may be any R  function, though it must return
     'TRUE' as long as it wants to stay connected  to the loop.

     Timeout tasks are performed once per some specified interval of
     time. Use  'gTimeoutAdd' to register such a handler.

     When the event loop is idle (not busy) it will execute the idle
     handlers, which  may be registered with 'gIdleAdd'.

     If one needs to externally remove a handler from the loop,
     'gSourceRemove'  will serve this purpose.

_V_a_l_u_e:

     'gIdleAdd' and 'gTimeoutAdd' both return a source id that may be
     used  to remove the handler later.

_A_u_t_h_o_r(_s):

     Michael Lawrence

_R_e_f_e_r_e_n_c_e_s:

     <URL:
     http://developer.gnome.org/doc/API/2.0/glib/glib-The-Main-Event-Loop.html>

