idle                  package:RGtk                  R Documentation

_C_o_n_t_r_o_l _a _b_a_c_k_g_r_o_u_n_d/_i_d_l_e _f_u_n_c_t_i_o_n

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

     These functions allow one to register and remove a function that
     is called whenever Gtk has nothing else to do. In other words,
     these are background tasks that have less priority than timers and
     user interface events.

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

     gtkAddIdle(f, data=NULL, .flush=TRUE)
     gtkRemoveIdle(id)

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

       f: the function should take one or zero arguments depending on
          whether the argument 'data' is given. The function should
          return a logical value. If it returns 'FALSE', the timer is
          removed. If it returns 'TRUE', the timer  is re-registered
          and will be called after 'interval' milliseconds. 

    data: a value, which if specified, will be passed to the function
          'f' when it is invoked. This can be used to parameterize the
          function to have different functions. The same effect can be
          obtained using closures. 

  .flush: a logical value indicating whether to call 'gdkFlush' or not
          so as to force the processing of Gtk events.

      id: the object identifying the idle function in Gtk that was
          returned by a call to 'gtkAddTimeout'.

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

     'gtkAddTimeout' returns an object of class '"GtkIdleId"'. This is
     an integer giving the identifier returned by the low-level Gtk
     interface.

_N_o_t_e:

     This does not currently work when running directly in R. However,
     when running R inside another application such as GGobi, Gnumeric,
     etc. it and other event-loop facilities will work.

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

     Duncan Temple Lang <duncan@research.bell-labs.com>

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

_S_e_e _A_l_s_o:

     'gtkAddTimeout' 'gtkRemoveTimeout' 'gtkAddCallback'

_E_x_a_m_p_l_e_s:

