$tk_cb={}

def tk_callback(key,*args)

  $tk_cb[key].call(*args)
  nil #absolutely needed !
end

def igsclient_readlines
  if $igsClient
    $igsClient.getlines
    $ip._eval('after 10 ruby igsclient_readlines')
  end
end



module TkCb
  def TkCb.tk_register_cb(cb)
    $tk_cb[cb.id.to_s]=cb
  end
end
