Module: GirFFIGtk::MainLoopOverride::ClassMethods

Defined in:
lib/gir_ffi-gtk/base.rb

Overview

Implementation of class methods for MainLoopOverride

Instance Method Summary collapse

Instance Method Details

#main_with_overrideObject



45
46
47
48
49
50
51
52
53
54
# File 'lib/gir_ffi-gtk/base.rb', line 45

def main_with_override
  GLib::MainLoop::ThreadEnabler.instance.setup_idle_handler if RUBY_ENGINE == "ruby"
  GLib::MainLoop::RUNNING_LOOPS << DummyLoop.new
  result = main_without_override
  ex = GLib::MainLoop::EXCEPTIONS.shift
  GLib::MainLoop::RUNNING_LOOPS.pop
  raise ex if ex

  result
end