module FFI::Tk
Constants
- VERSION
Public Instance Methods
get_color(interp, string)
click to toggle source
# File lib/ffi-tk/ffi/tk.rb, line 41 def get_color(interp, string) if ::Tk::RUN_EVENTLOOP_ON_MAIN_THREAD XColor.new(Tk_GetColor(interp, Tk_MainWindow(interp), string)) else Tcl.thread_sender.thread_send do XColor.new(Tk_GetColor(interp, Tk_MainWindow(interp), string)) end end end
init(interp)
click to toggle source
# File lib/ffi-tk/ffi/tk.rb, line 59 def init(interp) if ::Tk::RUN_EVENTLOOP_ON_MAIN_THREAD if Tk_Init(interp) == 1 message = Tcl.Tcl_GetStringResult(interp) raise message end else Tcl.thread_sender.thread_send do if Tk_Init(interp) == 1 message = Tcl.Tcl_GetStringResult(interp) raise message end end end end
mainloop()
click to toggle source
# File lib/ffi-tk/ffi/tk.rb, line 51 def mainloop if ::Tk::RUN_EVENTLOOP_ON_MAIN_THREAD Tk_MainLoop() else Tcl.thread_sender.thread_send { Tk_MainLoop() } end end