summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tk.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/lib/tk.rb')
-rw-r--r--ext/tk/lib/tk.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb
index 35b9e7ce97..464f7f179e 100644
--- a/ext/tk/lib/tk.rb
+++ b/ext/tk/lib/tk.rb
@@ -765,7 +765,7 @@ module TkCore
TclTkLib.mainloop_watchdog(check_root)
end
- def do_one_event(flag = 0)
+ def do_one_event(flag = TclTkLib::EventFlag::ALL)
TclTkLib.do_one_event(flag)
end
@@ -777,6 +777,14 @@ module TkCore
TclTkLib.get_eventloop_tick
end
+ def set_no_event_wait(wait)
+ TclTkLib.set_no_even_wait(wait)
+ end
+
+ def get_no_event_wait()
+ TclTkLib.get_no_eventloop_wait
+ end
+
def set_eventloop_weight(loop_max, no_event_tick)
TclTkLib.set_eventloop_weight(loop_max, no_event_tick)
end
@@ -972,6 +980,10 @@ module Tk
tk_call('destroy', *wins)
end
+ def Tk.exit
+ tk_call('destroy', '.')
+ end
+
def Tk.current_grabs
tk_split_list(tk_call('grab', 'current'))
end