Module: TkCore

Overview

start Tk which depends on MultiTkIp

Defined Under Namespace

Classes: Tk_OBJECT_TABLE

Constant Summary collapse

INTERP_THREAD =
Thread.new{
  begin
    Thread.current[:interp] = interp = TclTkIp.new(name, opts)
  rescue => e
    Thread.current[:interp] = e
    raise e
  end

  status = [nil]
  def status.value
    self[0]
  end
  def status.value=(val)
    self[0] = val
  end

  Thread.current[:status] = status
  #sleep

  begin
    begin
      #TclTkLib.mainloop_abort_on_exception = false
      #Thread.current[:status].value = TclTkLib.mainloop(true)
      interp.mainloop_abort_on_exception = true
      Thread.current[:status].value = interp.mainloop(true)
    rescue SystemExit=>e
      Thread.current[:status].value = e
    rescue Exception=>e
      Thread.current[:status].value = e
      retry if interp.has_mainwindow?
    ensure
      INTERP_MUTEX.synchronize{ INTERP_ROOT_CHECK.broadcast }
    end

    #Thread.current[:status].value = TclTkLib.mainloop(false)
    Thread.current[:status].value = interp.mainloop(false)

  ensure
    # interp must be deleted before the thread for interp is dead.
    # If not, raise Tcl_Panic on Tcl_AsyncDelete because async handler 
    # deleted by the wrong thread.
    interp.delete
  end
}
INTERP_THREAD_STATUS =
INTERP_MUTEX =
Mutex.new
INTERP_ROOT_CHECK =
ConditionVariable.new
INTERP =
WITH_RUBY_VM =
Object.const_defined?(:RubyVM) && ::RubyVM.class == Class
WITH_ENCODING =
defined?(::Encoding.default_external) && true
RUN_EVENTLOOP_ON_MAIN_THREAD =

Ruby 1.9 !!!!!!!!!!!!!!!!!!!!!!!!!!

false
WIDGET_DESTROY_HOOK =
'<WIDGET_DESTROY_HOOK>'
EventFlag =
TclTkLib::EventFlag

Constants included from TkComm

TkComm::GET_CONFIGINFO_AS_ARRAY, TkComm::GET_CONFIGINFOwoRES_AS_ARRAY, TkComm::TkExtlibAutoloadModule, TkComm::Tk_CMDTBL, TkComm::Tk_IDs, TkComm::Tk_WINDOWS, TkComm::USE_TCLs_LIST_FUNCTIONS, TkComm::WidgetClassNames

Class Method Summary collapse

Instance Method Summary collapse

Methods included from TkComm

_at, _callback_entry?, _callback_entry_class?, _curr_cmd_id, _fromUTF8, _genobj_for_tkwidget, _next_cmd_id, _toUTF8, array2tk_list, bind, bind_all, bind_append, bind_append_all, bind_remove, bind_remove_all, bindinfo, bindinfo_all, bool, image_obj, install_cmd, install_cmd, list, num_or_nil, num_or_str, number, procedure, simplelist, slice_ary, string, subst, tk_tcl2ruby, uninstall_cmd, uninstall_cmd, window

Methods included from TkEvent

#install_bind, #install_bind_for_event_class

Class Method Details

.callback(*arg) ⇒ Object



1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
# File 'lib/tk.rb', line 1525

def TkCore.callback(*arg)
  begin
    if TkCore::INTERP.tk_cmd_tbl.kind_of?(Hash)
      #TkCore::INTERP.tk_cmd_tbl[arg.shift].call(*arg)
      normal_ret = false
      ret = catch(:IRB_EXIT) do  # IRB hack
        retval = TkCore::INTERP.tk_cmd_tbl[arg.shift].call(*arg)
        normal_ret = true
        retval
      end
      unless normal_ret
        # catch IRB_EXIT
        exit(ret)
      end
      ret
    end
  rescue SystemExit=>e
    exit(e.status)
  rescue Interrupt=>e
    fail(e)
  rescue Exception => e
    begin
      msg = _toUTF8(e.class.inspect) + ': ' +
            _toUTF8(e.message) + "\n" +
            "\n---< backtrace of Ruby side >-----\n" +
            _toUTF8(e.backtrace.join("\n")) +
            "\n---< backtrace of Tk side >-------"
      if TkCore::WITH_ENCODING
        msg.force_encoding('utf-8')
      else
        msg.instance_variable_set(:@encoding, 'utf-8')
      end
    rescue Exception
      msg = e.class.inspect + ': ' + e.message + "\n" +
            "\n---< backtrace of Ruby side >-----\n" +
            e.backtrace.join("\n") +
            "\n---< backtrace of Tk side >-------"
    end
    # TkCore::INTERP._set_global_var('errorInfo', msg)
    # fail(e)
    fail(e, msg)
  end
end

Instance Method Details

#_tk_call_to_list_core(depth, arg_enc, val_enc, *args) ⇒ Object



2041
2042
2043
2044
2045
2046
2047
2048
2049
# File 'lib/tk.rb', line 2041

def _tk_call_to_list_core(depth, arg_enc, val_enc, *args)
  args = _conv_args([], arg_enc, *args)
  val = _tk_call_core(false, *args)
  if !depth.kind_of?(Integer) || depth == 0
    tk_split_simplelist(val, false, val_enc)
  else
    tk_split_list(val, depth, false, val_enc)
  end
end

#after(ms, cmd = Proc.new) ⇒ Object



1611
1612
1613
1614
1615
1616
# File 'lib/tk.rb', line 1611

def after(ms, cmd=Proc.new)
  cmdid = install_cmd(proc{ret = cmd.call;uninstall_cmd(cmdid); ret})
  after_id = tk_call_without_enc("after",ms,cmdid)
  after_id.instance_variable_set('@cmdid', cmdid)
  after_id
end

#after_cancel(afterId) ⇒ Object

def after_idle(cmd=Proc.new)

  crit_bup = Thread.critical
  Thread.critical = true

  myid = _curr_cmd_id
  cmdid = install_cmd(proc{ret = cmd.call;uninstall_cmd(myid); ret})

  Thread.critical = crit_bup

  tk_call_without_enc('after','idle',cmdid)
end


1663
1664
1665
1666
1667
1668
1669
1670
# File 'lib/tk.rb', line 1663

def after_cancel(afterId)
  tk_call_without_enc('after','cancel',afterId)
  if (cmdid = afterId.instance_variable_get('@cmdid'))
    afterId.instance_variable_set('@cmdid', nil)
    uninstall_cmd(cmdid)
  end
  afterId
end

#after_idle(cmd = Proc.new) ⇒ Object

def after(ms, cmd=Proc.new)

crit_bup = Thread.critical
Thread.critical = true

myid = _curr_cmd_id
cmdid = install_cmd(proc{ret = cmd.call;uninstall_cmd(myid); ret})

Thread.critical = crit_bup

tk_call_without_enc("after",ms,cmdid)  # return id

# return # if false #defined? Thread # Thread.start do # ms = Float(ms)/1000 # ms = 10 if ms == 0 # sleep ms/1000 # cmd.call # end # else # cmdid = install_cmd(cmd) # tk_call(“after”,ms,cmdid) # end

end


1643
1644
1645
1646
1647
1648
# File 'lib/tk.rb', line 1643

def after_idle(cmd=Proc.new)
  cmdid = install_cmd(proc{ret = cmd.call;uninstall_cmd(cmdid); ret})
  after_id = tk_call_without_enc('after','idle',cmdid)
  after_id.instance_variable_set('@cmdid', cmdid)
  after_id
end

#appname(name = None) ⇒ Object



1704
1705
1706
# File 'lib/tk.rb', line 1704

def appname(name=None)
  tk_call('tk', 'appname', name)
end

#appsend(interp, async, *args) ⇒ Object



1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
# File 'lib/tk.rb', line 1712

def appsend(interp, async, *args)
  if $SAFE >= 4
    fail SecurityError, "cannot send Tk commands at level 4"
  elsif $SAFE >= 1 && args.find{|obj| obj.tainted?}
    fail SecurityError, "cannot send tainted Tk commands at level #{$SAFE}"
  end
  if async != true && async != false && async != nil
    args.unshift(async)
    async = false
  end
  if async
    tk_call('send', '-async', '--', interp, *args)
  else
    tk_call('send', '--', interp, *args)
  end
end

#appsend_denyObject



1708
1709
1710
# File 'lib/tk.rb', line 1708

def appsend_deny
  tk_call('rename', 'send', '')
end

#appsend_displayof(interp, win, async, *args) ⇒ Object



1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
# File 'lib/tk.rb', line 1747

def appsend_displayof(interp, win, async, *args)
  if $SAFE >= 4
    fail SecurityError, "cannot send Tk commands at level 4"
  elsif $SAFE >= 1 && args.find{|obj| obj.tainted?}
    fail SecurityError, "cannot send tainted Tk commands at level #{$SAFE}"
  end
  win = '.' if win == nil
  if async != true && async != false && async != nil
    args.unshift(async)
    async = false
  end
  if async
    tk_call('send', '-async', '-displayof', win, '--', interp, *args)
  else
    tk_call('send', '-displayor', win, '--', interp, *args)
  end
end

#callback_breakObject



1513
1514
1515
# File 'lib/tk.rb', line 1513

def callback_break
  fail TkCallbackBreak, "Tk callback returns 'break' status"
end

#callback_continueObject



1517
1518
1519
# File 'lib/tk.rb', line 1517

def callback_continue
  fail TkCallbackContinue, "Tk callback returns 'continue' status"
end

#callback_returnObject



1521
1522
1523
# File 'lib/tk.rb', line 1521

def callback_return
  fail TkCallbackReturn, "Tk callback returns 'return' status"
end

#chooseColor(keys = nil) ⇒ Object



1931
1932
1933
# File 'lib/tk.rb', line 1931

def chooseColor(keys = nil)
  tk_call('tk_chooseColor', *hash_kv(keys))
end

#chooseDirectory(keys = nil) ⇒ Object



1935
1936
1937
# File 'lib/tk.rb', line 1935

def chooseDirectory(keys = nil)
  tk_call('tk_chooseDirectory', *hash_kv(keys))
end

#do_one_event(flag = TclTkLib::EventFlag::ALL) ⇒ Object



1857
1858
1859
# File 'lib/tk.rb', line 1857

def do_one_event(flag = TclTkLib::EventFlag::ALL)
  TclTkLib.do_one_event(flag)
end

#event_generate(win, context, keys = nil) ⇒ Object



1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
# File 'lib/tk.rb', line 1898

def event_generate(win, context, keys=nil)
  #win = win.path if win.kind_of?(TkObject)
  if context.kind_of?(TkEvent::Event)
    context.generate(win, ((keys)? keys: {}))
  elsif keys
    tk_call_without_enc('event', 'generate', win,
                        "<#{tk_event_sequence(context)}>",
                        *hash_kv(keys, true))
  else
    tk_call_without_enc('event', 'generate', win,
                        "<#{tk_event_sequence(context)}>")
  end
  nil
end

#get_eventloop_tickObject



1865
1866
1867
# File 'lib/tk.rb', line 1865

def get_eventloop_tick()
  TclTkLib.get_eventloop_tick
end

#get_eventloop_weightObject



1881
1882
1883
# File 'lib/tk.rb', line 1881

def get_eventloop_weight()
  TclTkLib.get_eventloop_weight
end

#get_no_event_waitObject



1873
1874
1875
# File 'lib/tk.rb', line 1873

def get_no_event_wait()
  TclTkLib.get_no_eventloop_wait
end

#getMultipleOpenFile(keys = nil) ⇒ Object



1920
1921
1922
# File 'lib/tk.rb', line 1920

def getMultipleOpenFile(keys = nil)
  simplelist(tk_call('tk_getOpenFile', '-multiple', '1', *hash_kv(keys)))
end

#getMultipleSaveFile(keys = nil) ⇒ Object



1927
1928
1929
# File 'lib/tk.rb', line 1927

def getMultipleSaveFile(keys = nil)
  simplelist(tk_call('tk_getSaveFile', '-multiple', '1', *hash_kv(keys)))
end

#getOpenFile(keys = nil) ⇒ Object



1917
1918
1919
# File 'lib/tk.rb', line 1917

def getOpenFile(keys = nil)
  tk_call('tk_getOpenFile', *hash_kv(keys))
end

#getSaveFile(keys = nil) ⇒ Object



1924
1925
1926
# File 'lib/tk.rb', line 1924

def getSaveFile(keys = nil)
  tk_call('tk_getSaveFile', *hash_kv(keys))
end

#inactiveObject



1691
1692
1693
# File 'lib/tk.rb', line 1691

def inactive
  Integer(tk_call_without_enc('tk', 'inactive'))
end

#inactive_displayof(win) ⇒ Object



1694
1695
1696
# File 'lib/tk.rb', line 1694

def inactive_displayof(win)
  Integer(tk_call_without_enc('tk', 'inactive', '-displayof', win))
end

#info(*args) ⇒ Object



1784
1785
1786
# File 'lib/tk.rb', line 1784

def info(*args)
  tk_call('info', *args)
end

#ip_eval(cmd_string) ⇒ Object



1955
1956
1957
# File 'lib/tk.rb', line 1955

def ip_eval(cmd_string)
  _ip_eval_core(nil, cmd_string)
end

#ip_eval_with_enc(cmd_string) ⇒ Object



1963
1964
1965
# File 'lib/tk.rb', line 1963

def ip_eval_with_enc(cmd_string)
  _ip_eval_core(true, cmd_string)
end

#ip_eval_without_enc(cmd_string) ⇒ Object



1959
1960
1961
# File 'lib/tk.rb', line 1959

def ip_eval_without_enc(cmd_string)
  _ip_eval_core(false, cmd_string)
end

#ip_invoke(*args) ⇒ Object



1983
1984
1985
# File 'lib/tk.rb', line 1983

def ip_invoke(*args)
  _ip_invoke_core(nil, *args)
end

#ip_invoke_with_enc(*args) ⇒ Object



1991
1992
1993
# File 'lib/tk.rb', line 1991

def ip_invoke_with_enc(*args)
  _ip_invoke_core(true, *args)
end

#ip_invoke_without_enc(*args) ⇒ Object



1987
1988
1989
# File 'lib/tk.rb', line 1987

def ip_invoke_without_enc(*args)
  _ip_invoke_core(false, *args)
end

#is_mainloop?Boolean

Returns:

  • (Boolean)


1848
1849
1850
# File 'lib/tk.rb', line 1848

def is_mainloop?
  TclTkLib.mainloop_thread? == true
end

#load_cmd_on_ip(tk_cmd) ⇒ Object

def TkCore.callback(arg_str)

# arg = tk_split_list(arg_str)
arg = tk_split_simplelist(arg_str)
#_get_eval_string(TkUtil.eval_cmd(Tk_CMDTBL[arg.shift], *arg))
#_get_eval_string(TkUtil.eval_cmd(TkCore::INTERP.tk_cmd_tbl[arg.shift],
#                        *arg))
# TkCore::INTERP.tk_cmd_tbl[arg.shift].call(*arg)
begin
  TkCore::INTERP.tk_cmd_tbl[arg.shift].call(*arg)
rescue Exception => e
  raise(e, e.class.inspect + ': ' + e.message + "\n" +
           "\n---< backtrace of Ruby side >-----\n" +
           e.backtrace.join("\n") +
           "\n---< backtrace of Tk side >-------")
end

#=begin # cb_obj = TkCore::INTERP.tk_cmd_tbl # unless $DEBUG # cb_obj.call(*arg) # else # begin # raise ‘check backtrace’ # rescue # # ignore backtrace before ‘callback’ # pos = -($!.backtrace.size) # end # begin # cb_obj.call(*arg) # rescue # trace = $!.backtrace # raise $!, “n#0: #TkCore.$!$!.message (#TkCore.$!$!.class)n” + # “tfrom #.join(”ntfrom “)” # end # end #=end

end


1607
1608
1609
# File 'lib/tk.rb', line 1607

def load_cmd_on_ip(tk_cmd)
  bool(tk_call('auto_load', tk_cmd))
end

#mainloop(check_root = true) ⇒ Object



1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
# File 'lib/tk.rb', line 1788

def mainloop(check_root = true)
  if !TkCore::WITH_RUBY_VM
    TclTkLib.mainloop(check_root)

  elsif TkCore::RUN_EVENTLOOP_ON_MAIN_THREAD
    # if TclTkLib::WINDOWING_SYSTEM == 'aqua' &&
    #if TkCore::INTERP._invoke_without_enc('tk','windowingsystem')=='aqua' &&
    #    Thread.current != Thread.main &&
    #    (TclTkLib.get_version <=> [8,4,TclTkLib::RELEASE_TYPE::FINAL,9]) > 0
    #  raise RuntimeError,
    #       "eventloop on TkAqua ( > Tk8.4.9 ) works on the main thread only"
    #end
    if Thread.current != Thread.main
      raise RuntimeError, "Tk.mainloop is allowed on the main thread only"
    end
    TclTkLib.mainloop(check_root)

  else ### Ruby 1.9 !!!!!
    unless TkCore::INTERP.default_master?
      # [MultiTkIp] slave interp ?
      return TkCore::INTERP._thread_tkwait('window', '.') if check_root
    end

    begin
      TclTkLib.set_eventloop_window_mode(true)
      if check_root
        INTERP_MUTEX.synchronize{
          INTERP_ROOT_CHECK.wait(INTERP_MUTEX)
          status = INTERP_THREAD_STATUS.value
          if status && TkCore::INTERP.default_master?
            INTERP_THREAD_STATUS.value = nil if $SAFE < 4
            raise status if status.kind_of?(Exception)
          end
        }
      else
        INTERP_THREAD.value
      end
    ensure
      TclTkLib.set_eventloop_window_mode(false)
    end
  end
end

#mainloop_exist?Boolean

Returns:

  • (Boolean)


1844
1845
1846
# File 'lib/tk.rb', line 1844

def mainloop_exist?
  TclTkLib.mainloop_thread? != nil
end

#mainloop_thread?Boolean

Returns:

  • (Boolean)


1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
# File 'lib/tk.rb', line 1831

def mainloop_thread?
  # true  : current thread is mainloop
  # nil   : there is no mainloop
  # false : mainloop is running on the other thread
  #         ( At then, it is dangerous to call Tk interpreter directly. )
  if !TkCore::WITH_RUBY_VM || TkCore::RUN_EVENTLOOP_ON_MAIN_THREAD
    ### Ruby 1.9 !!!!!!!!!!!
    TclTkLib.mainloop_thread?
  else
    Thread.current == INTERP_THREAD
  end
end

#mainloop_watchdog(check_root = true) ⇒ Object



1852
1853
1854
1855
# File 'lib/tk.rb', line 1852

def mainloop_watchdog(check_root = true)
  # watchdog restarts mainloop when mainloop is dead
  TclTkLib.mainloop_watchdog(check_root)
end

#messageBox(keys) ⇒ Object



1913
1914
1915
# File 'lib/tk.rb', line 1913

def messageBox(keys)
  tk_call('tk_messageBox', *hash_kv(keys))
end

#rb_appsend(interp, async, *args) ⇒ Object



1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
# File 'lib/tk.rb', line 1729

def rb_appsend(interp, async, *args)
  if $SAFE >= 4
    fail SecurityError, "cannot send Ruby commands at level 4"
  elsif $SAFE >= 1 && args.find{|obj| obj.tainted?}
    fail SecurityError, "cannot send tainted Ruby commands at level #{$SAFE}"
  end
  if async != true && async != false && async != nil
    args.unshift(async)
    async = false
  end
  #args = args.collect!{|c| _get_eval_string(c).gsub(/[\[\]$"]/, '\\\\\&')}
  args = args.collect!{|c| _get_eval_string(c).gsub(/[\[\]$"\\]/, '\\\\\&')}
  # args.push(').to_s"')
  # appsend(interp, async, 'ruby "(', *args)
  args.push('}.call)"')
  appsend(interp, async, 'ruby "TkComm._get_eval_string(proc{', *args)
end

#rb_appsend_displayof(interp, win, async, *args) ⇒ Object



1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
# File 'lib/tk.rb', line 1765

def rb_appsend_displayof(interp, win, async, *args)
  if $SAFE >= 4
    fail SecurityError, "cannot send Ruby commands at level 4"
  elsif $SAFE >= 1 && args.find{|obj| obj.tainted?}
    fail SecurityError, "cannot send tainted Ruby commands at level #{$SAFE}"
  end
  win = '.' if win == nil
  if async != true && async != false && async != nil
    args.unshift(async)
    async = false
  end
  #args = args.collect!{|c| _get_eval_string(c).gsub(/[\[\]$"]/, '\\\\\&')}
  args = args.collect!{|c| _get_eval_string(c).gsub(/[\[\]$"\\]/, '\\\\\&')}
  # args.push(').to_s"')
  # appsend_displayof(interp, win, async, 'ruby "(', *args)
  args.push('}.call)"')
  appsend(interp, win, async, 'ruby "TkComm._get_eval_string(proc{', *args)
end

#reset_inactiveObject



1697
1698
1699
# File 'lib/tk.rb', line 1697

def reset_inactive
  tk_call_without_enc('tk', 'inactive', 'reset')
end

#reset_inactive_displayof(win) ⇒ Object



1700
1701
1702
# File 'lib/tk.rb', line 1700

def reset_inactive_displayof(win)
  tk_call_without_enc('tk', 'inactive', '-displayof', win, 'reset')
end

#restart(app_name = nil, keys = {}) ⇒ Object



1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
# File 'lib/tk.rb', line 1885

def restart(app_name = nil, keys = {})
  TkCore::INTERP.init_ip_internal

  tk_call('set', 'argv0', app_name) if app_name
  if keys.kind_of?(Hash)
    # tk_call('set', 'argc', keys.size * 2)
    tk_call('set', 'argv', hash_kv(keys).join(' '))
  end

  INTERP.restart
  nil
end

#scaling(scale = nil) ⇒ Object



1676
1677
1678
1679
1680
1681
1682
# File 'lib/tk.rb', line 1676

def scaling(scale=nil)
  if scale
    tk_call_without_enc('tk', 'scaling', scale)
  else
    Float(number(tk_call_without_enc('tk', 'scaling')))
  end
end

#scaling_displayof(win, scale = nil) ⇒ Object



1683
1684
1685
1686
1687
1688
1689
# File 'lib/tk.rb', line 1683

def scaling_displayof(win, scale=nil)
  if scale
    tk_call_without_enc('tk', 'scaling', '-displayof', win, scale)
  else
    Float(number(tk_call_without_enc('tk', '-displayof', win, 'scaling')))
  end
end

#set_eventloop_tick(timer_tick) ⇒ Object



1861
1862
1863
# File 'lib/tk.rb', line 1861

def set_eventloop_tick(timer_tick)
  TclTkLib.set_eventloop_tick(timer_tick)
end

#set_eventloop_weight(loop_max, no_event_tick) ⇒ Object



1877
1878
1879
# File 'lib/tk.rb', line 1877

def set_eventloop_weight(loop_max, no_event_tick)
  TclTkLib.set_eventloop_weight(loop_max, no_event_tick)
end

#set_no_event_wait(wait) ⇒ Object



1869
1870
1871
# File 'lib/tk.rb', line 1869

def set_no_event_wait(wait)
  TclTkLib.set_no_even_wait(wait)
end

#tk_call(*args) ⇒ Object



2029
2030
2031
# File 'lib/tk.rb', line 2029

def tk_call(*args)
  _tk_call_core(nil, *args)
end

#tk_call_to_list(*args) ⇒ Object

private :_tk_call_to_list_core



2052
2053
2054
# File 'lib/tk.rb', line 2052

def tk_call_to_list(*args)
  _tk_call_to_list_core(-1, nil, true, *args)
end

#tk_call_to_list_with_enc(*args) ⇒ Object



2060
2061
2062
# File 'lib/tk.rb', line 2060

def tk_call_to_list_with_enc(*args)
  _tk_call_to_list_core(-1, true, true, *args)
end

#tk_call_to_list_without_enc(*args) ⇒ Object



2056
2057
2058
# File 'lib/tk.rb', line 2056

def tk_call_to_list_without_enc(*args)
  _tk_call_to_list_core(-1, false, false, *args)
end

#tk_call_to_simplelist(*args) ⇒ Object



2064
2065
2066
# File 'lib/tk.rb', line 2064

def tk_call_to_simplelist(*args)
  _tk_call_to_list_core(0, nil, true, *args)
end

#tk_call_to_simplelist_with_enc(*args) ⇒ Object



2072
2073
2074
# File 'lib/tk.rb', line 2072

def tk_call_to_simplelist_with_enc(*args)
  _tk_call_to_list_core(0, true, true, *args)
end

#tk_call_to_simplelist_without_enc(*args) ⇒ Object



2068
2069
2070
# File 'lib/tk.rb', line 2068

def tk_call_to_simplelist_without_enc(*args)
  _tk_call_to_list_core(0, false, false, *args)
end

#tk_call_with_enc(*args) ⇒ Object



2037
2038
2039
# File 'lib/tk.rb', line 2037

def tk_call_with_enc(*args)
  _tk_call_core(true, *args)
end

#tk_call_without_enc(*args) ⇒ Object



2033
2034
2035
# File 'lib/tk.rb', line 2033

def tk_call_without_enc(*args)
  _tk_call_core(false, *args)
end

#windowingsystemObject



1672
1673
1674
# File 'lib/tk.rb', line 1672

def windowingsystem
  tk_call_without_enc('tk', 'windowingsystem')
end