tk 0.4.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (307) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +6 -0
  3. data/.github/workflows/test.yml +29 -0
  4. data/MANUAL_tcltklib.ja +1 -1
  5. data/README.macosx-aqua +1 -1
  6. data/README.md +8 -0
  7. data/ext/tk/extconf.rb +2 -2
  8. data/ext/tk/tkutil/tkutil.c +6 -5
  9. data/lib/multi-tk.rb +2 -2
  10. data/lib/thread_tk.rb +13 -0
  11. data/lib/tk/bgerror.rb +1 -1
  12. data/lib/tk/bindtag.rb +1 -1
  13. data/lib/tk/busy.rb +1 -1
  14. data/lib/tk/button.rb +1 -1
  15. data/lib/tk/canvas.rb +1 -1
  16. data/lib/tk/canvastag.rb +1 -1
  17. data/lib/tk/checkbutton.rb +1 -1
  18. data/lib/tk/clipboard.rb +1 -1
  19. data/lib/tk/clock.rb +1 -1
  20. data/lib/tk/composite.rb +1 -1
  21. data/lib/tk/console.rb +1 -1
  22. data/lib/tk/dialog.rb +1 -1
  23. data/lib/tk/encodedstr.rb +1 -1
  24. data/lib/tk/entry.rb +1 -1
  25. data/lib/tk/font.rb +1 -1
  26. data/lib/tk/fontchooser.rb +1 -1
  27. data/lib/tk/frame.rb +1 -1
  28. data/lib/tk/grid.rb +1 -1
  29. data/lib/tk/image.rb +1 -1
  30. data/lib/tk/itemconfig.rb +1 -1
  31. data/lib/tk/itemfont.rb +1 -1
  32. data/lib/tk/kinput.rb +1 -1
  33. data/lib/tk/label.rb +1 -1
  34. data/lib/tk/labelframe.rb +1 -1
  35. data/lib/tk/listbox.rb +1 -1
  36. data/lib/tk/macpkg.rb +1 -1
  37. data/lib/tk/menu.rb +1 -1
  38. data/lib/tk/menubar.rb +1 -1
  39. data/lib/tk/message.rb +1 -1
  40. data/lib/tk/mngfocus.rb +1 -1
  41. data/lib/tk/msgcat.rb +1 -1
  42. data/lib/tk/namespace.rb +1 -1
  43. data/lib/tk/optiondb.rb +1 -1
  44. data/lib/tk/optionobj.rb +1 -1
  45. data/lib/tk/pack.rb +1 -1
  46. data/lib/tk/package.rb +1 -1
  47. data/lib/tk/palette.rb +1 -1
  48. data/lib/tk/panedwindow.rb +1 -1
  49. data/lib/tk/place.rb +1 -1
  50. data/lib/tk/radiobutton.rb +1 -1
  51. data/lib/tk/root.rb +1 -1
  52. data/lib/tk/scale.rb +1 -1
  53. data/lib/tk/scrollable.rb +1 -1
  54. data/lib/tk/scrollbar.rb +1 -1
  55. data/lib/tk/scrollbox.rb +1 -1
  56. data/lib/tk/selection.rb +1 -1
  57. data/lib/tk/spinbox.rb +1 -1
  58. data/lib/tk/tagfont.rb +1 -1
  59. data/lib/tk/text.rb +1 -1
  60. data/lib/tk/textimage.rb +1 -1
  61. data/lib/tk/textmark.rb +1 -1
  62. data/lib/tk/texttag.rb +1 -1
  63. data/lib/tk/textwindow.rb +1 -1
  64. data/lib/tk/timer.rb +1 -1
  65. data/lib/tk/tk_mac.rb +1 -1
  66. data/lib/tk/toplevel.rb +1 -1
  67. data/lib/tk/txtwin_abst.rb +1 -1
  68. data/lib/tk/validation.rb +1 -1
  69. data/lib/tk/variable.rb +1 -1
  70. data/lib/tk/virtevent.rb +1 -1
  71. data/lib/tk/winfo.rb +1 -1
  72. data/lib/tk/winpkg.rb +1 -1
  73. data/lib/tk/wm.rb +1 -1
  74. data/lib/tk/xim.rb +1 -1
  75. data/lib/tk.rb +10 -59
  76. data/lib/tkextlib/ICONS/icons.rb +1 -1
  77. data/lib/tkextlib/blt/barchart.rb +1 -1
  78. data/lib/tkextlib/blt/bitmap.rb +1 -1
  79. data/lib/tkextlib/blt/busy.rb +1 -1
  80. data/lib/tkextlib/blt/component.rb +1 -1
  81. data/lib/tkextlib/blt/container.rb +1 -1
  82. data/lib/tkextlib/blt/cutbuffer.rb +1 -1
  83. data/lib/tkextlib/blt/dragdrop.rb +1 -1
  84. data/lib/tkextlib/blt/eps.rb +1 -1
  85. data/lib/tkextlib/blt/graph.rb +1 -1
  86. data/lib/tkextlib/blt/htext.rb +1 -1
  87. data/lib/tkextlib/blt/spline.rb +1 -1
  88. data/lib/tkextlib/blt/stripchart.rb +1 -1
  89. data/lib/tkextlib/blt/table.rb +1 -1
  90. data/lib/tkextlib/blt/tabnotebook.rb +1 -1
  91. data/lib/tkextlib/blt/tabset.rb +1 -1
  92. data/lib/tkextlib/blt/ted.rb +1 -1
  93. data/lib/tkextlib/blt/tile/button.rb +1 -1
  94. data/lib/tkextlib/blt/tile/checkbutton.rb +1 -1
  95. data/lib/tkextlib/blt/tile/frame.rb +1 -1
  96. data/lib/tkextlib/blt/tile/label.rb +1 -1
  97. data/lib/tkextlib/blt/tile/radiobutton.rb +1 -1
  98. data/lib/tkextlib/blt/tile/scrollbar.rb +1 -1
  99. data/lib/tkextlib/blt/tile/toplevel.rb +1 -1
  100. data/lib/tkextlib/blt/tile.rb +1 -1
  101. data/lib/tkextlib/blt/tree.rb +1 -1
  102. data/lib/tkextlib/blt/treeview.rb +1 -1
  103. data/lib/tkextlib/blt/unix_dnd.rb +1 -1
  104. data/lib/tkextlib/blt/vector.rb +1 -1
  105. data/lib/tkextlib/blt/watch.rb +1 -1
  106. data/lib/tkextlib/blt/win_printer.rb +1 -1
  107. data/lib/tkextlib/blt/winop.rb +1 -1
  108. data/lib/tkextlib/blt.rb +1 -1
  109. data/lib/tkextlib/bwidget/arrowbutton.rb +1 -1
  110. data/lib/tkextlib/bwidget/bitmap.rb +1 -1
  111. data/lib/tkextlib/bwidget/button.rb +1 -1
  112. data/lib/tkextlib/bwidget/buttonbox.rb +1 -1
  113. data/lib/tkextlib/bwidget/combobox.rb +1 -1
  114. data/lib/tkextlib/bwidget/dialog.rb +1 -1
  115. data/lib/tkextlib/bwidget/dragsite.rb +1 -1
  116. data/lib/tkextlib/bwidget/dropsite.rb +1 -1
  117. data/lib/tkextlib/bwidget/dynamichelp.rb +1 -1
  118. data/lib/tkextlib/bwidget/entry.rb +1 -1
  119. data/lib/tkextlib/bwidget/label.rb +1 -1
  120. data/lib/tkextlib/bwidget/labelentry.rb +1 -1
  121. data/lib/tkextlib/bwidget/labelframe.rb +1 -1
  122. data/lib/tkextlib/bwidget/listbox.rb +1 -1
  123. data/lib/tkextlib/bwidget/mainframe.rb +1 -1
  124. data/lib/tkextlib/bwidget/messagedlg.rb +1 -1
  125. data/lib/tkextlib/bwidget/notebook.rb +1 -1
  126. data/lib/tkextlib/bwidget/pagesmanager.rb +1 -1
  127. data/lib/tkextlib/bwidget/panedwindow.rb +1 -1
  128. data/lib/tkextlib/bwidget/panelframe.rb +1 -1
  129. data/lib/tkextlib/bwidget/passwddlg.rb +1 -1
  130. data/lib/tkextlib/bwidget/progressbar.rb +1 -1
  131. data/lib/tkextlib/bwidget/progressdlg.rb +1 -1
  132. data/lib/tkextlib/bwidget/scrollableframe.rb +1 -1
  133. data/lib/tkextlib/bwidget/scrolledwindow.rb +1 -1
  134. data/lib/tkextlib/bwidget/scrollview.rb +1 -1
  135. data/lib/tkextlib/bwidget/selectcolor.rb +1 -1
  136. data/lib/tkextlib/bwidget/selectfont.rb +1 -1
  137. data/lib/tkextlib/bwidget/separator.rb +1 -1
  138. data/lib/tkextlib/bwidget/spinbox.rb +1 -1
  139. data/lib/tkextlib/bwidget/statusbar.rb +1 -1
  140. data/lib/tkextlib/bwidget/titleframe.rb +1 -1
  141. data/lib/tkextlib/bwidget/tree.rb +1 -1
  142. data/lib/tkextlib/bwidget/widget.rb +1 -1
  143. data/lib/tkextlib/bwidget.rb +1 -1
  144. data/lib/tkextlib/itcl/incr_tcl.rb +1 -1
  145. data/lib/tkextlib/itk/incr_tk.rb +1 -1
  146. data/lib/tkextlib/iwidgets/buttonbox.rb +1 -1
  147. data/lib/tkextlib/iwidgets/calendar.rb +1 -1
  148. data/lib/tkextlib/iwidgets/canvasprintbox.rb +1 -1
  149. data/lib/tkextlib/iwidgets/canvasprintdialog.rb +1 -1
  150. data/lib/tkextlib/iwidgets/checkbox.rb +1 -1
  151. data/lib/tkextlib/iwidgets/combobox.rb +1 -1
  152. data/lib/tkextlib/iwidgets/dateentry.rb +1 -1
  153. data/lib/tkextlib/iwidgets/datefield.rb +1 -1
  154. data/lib/tkextlib/iwidgets/dialog.rb +1 -1
  155. data/lib/tkextlib/iwidgets/dialogshell.rb +1 -1
  156. data/lib/tkextlib/iwidgets/disjointlistbox.rb +1 -1
  157. data/lib/tkextlib/iwidgets/entryfield.rb +1 -1
  158. data/lib/tkextlib/iwidgets/extbutton.rb +1 -1
  159. data/lib/tkextlib/iwidgets/extfileselectionbox.rb +1 -1
  160. data/lib/tkextlib/iwidgets/extfileselectiondialog.rb +1 -1
  161. data/lib/tkextlib/iwidgets/feedback.rb +1 -1
  162. data/lib/tkextlib/iwidgets/fileselectionbox.rb +1 -1
  163. data/lib/tkextlib/iwidgets/fileselectiondialog.rb +1 -1
  164. data/lib/tkextlib/iwidgets/finddialog.rb +1 -1
  165. data/lib/tkextlib/iwidgets/hierarchy.rb +1 -1
  166. data/lib/tkextlib/iwidgets/hyperhelp.rb +1 -1
  167. data/lib/tkextlib/iwidgets/labeledframe.rb +1 -1
  168. data/lib/tkextlib/iwidgets/labeledwidget.rb +1 -1
  169. data/lib/tkextlib/iwidgets/mainwindow.rb +1 -1
  170. data/lib/tkextlib/iwidgets/menubar.rb +1 -1
  171. data/lib/tkextlib/iwidgets/messagebox.rb +1 -1
  172. data/lib/tkextlib/iwidgets/messagedialog.rb +1 -1
  173. data/lib/tkextlib/iwidgets/notebook.rb +2 -2
  174. data/lib/tkextlib/iwidgets/optionmenu.rb +1 -1
  175. data/lib/tkextlib/iwidgets/panedwindow.rb +1 -1
  176. data/lib/tkextlib/iwidgets/promptdialog.rb +1 -1
  177. data/lib/tkextlib/iwidgets/pushbutton.rb +1 -1
  178. data/lib/tkextlib/iwidgets/radiobox.rb +1 -1
  179. data/lib/tkextlib/iwidgets/scopedobject.rb +1 -1
  180. data/lib/tkextlib/iwidgets/scrolledcanvas.rb +1 -1
  181. data/lib/tkextlib/iwidgets/scrolledframe.rb +1 -1
  182. data/lib/tkextlib/iwidgets/scrolledhtml.rb +1 -1
  183. data/lib/tkextlib/iwidgets/scrolledlistbox.rb +1 -1
  184. data/lib/tkextlib/iwidgets/scrolledtext.rb +1 -1
  185. data/lib/tkextlib/iwidgets/scrolledwidget.rb +1 -1
  186. data/lib/tkextlib/iwidgets/selectionbox.rb +1 -1
  187. data/lib/tkextlib/iwidgets/selectiondialog.rb +1 -1
  188. data/lib/tkextlib/iwidgets/shell.rb +1 -1
  189. data/lib/tkextlib/iwidgets/spindate.rb +1 -1
  190. data/lib/tkextlib/iwidgets/spinint.rb +1 -1
  191. data/lib/tkextlib/iwidgets/spinner.rb +1 -1
  192. data/lib/tkextlib/iwidgets/spintime.rb +1 -1
  193. data/lib/tkextlib/iwidgets/tabnotebook.rb +2 -2
  194. data/lib/tkextlib/iwidgets/tabset.rb +1 -1
  195. data/lib/tkextlib/iwidgets/timeentry.rb +1 -1
  196. data/lib/tkextlib/iwidgets/timefield.rb +1 -1
  197. data/lib/tkextlib/iwidgets/toolbar.rb +1 -1
  198. data/lib/tkextlib/iwidgets/watch.rb +1 -1
  199. data/lib/tkextlib/iwidgets.rb +1 -1
  200. data/lib/tkextlib/pkg_checker.rb +1 -1
  201. data/lib/tkextlib/tcllib/autoscroll.rb +1 -1
  202. data/lib/tkextlib/tcllib/calendar.rb +1 -1
  203. data/lib/tkextlib/tcllib/canvas_sqmap.rb +1 -1
  204. data/lib/tkextlib/tcllib/canvas_zoom.rb +1 -1
  205. data/lib/tkextlib/tcllib/chatwidget.rb +1 -1
  206. data/lib/tkextlib/tcllib/crosshair.rb +1 -1
  207. data/lib/tkextlib/tcllib/ctext.rb +1 -1
  208. data/lib/tkextlib/tcllib/cursor.rb +1 -1
  209. data/lib/tkextlib/tcllib/dateentry.rb +1 -1
  210. data/lib/tkextlib/tcllib/datefield.rb +1 -1
  211. data/lib/tkextlib/tcllib/diagrams.rb +1 -1
  212. data/lib/tkextlib/tcllib/dialog.rb +1 -1
  213. data/lib/tkextlib/tcllib/getstring.rb +1 -1
  214. data/lib/tkextlib/tcllib/history.rb +1 -1
  215. data/lib/tkextlib/tcllib/ico.rb +1 -1
  216. data/lib/tkextlib/tcllib/ip_entry.rb +1 -1
  217. data/lib/tkextlib/tcllib/khim.rb +1 -1
  218. data/lib/tkextlib/tcllib/menuentry.rb +1 -1
  219. data/lib/tkextlib/tcllib/ntext.rb +1 -1
  220. data/lib/tkextlib/tcllib/panelframe.rb +1 -1
  221. data/lib/tkextlib/tcllib/plotchart.rb +1 -1
  222. data/lib/tkextlib/tcllib/ruler.rb +1 -1
  223. data/lib/tkextlib/tcllib/screenruler.rb +1 -1
  224. data/lib/tkextlib/tcllib/scrolledwindow.rb +1 -1
  225. data/lib/tkextlib/tcllib/scrollwin.rb +1 -1
  226. data/lib/tkextlib/tcllib/statusbar.rb +1 -1
  227. data/lib/tkextlib/tcllib/style.rb +1 -1
  228. data/lib/tkextlib/tcllib/superframe.rb +1 -1
  229. data/lib/tkextlib/tcllib/swaplist.rb +1 -1
  230. data/lib/tkextlib/tcllib/tablelist.rb +1 -1
  231. data/lib/tkextlib/tcllib/tablelist_core.rb +5 -5
  232. data/lib/tkextlib/tcllib/tablelist_tile.rb +1 -1
  233. data/lib/tkextlib/tcllib/tkpiechart.rb +1 -1
  234. data/lib/tkextlib/tcllib/toolbar.rb +1 -1
  235. data/lib/tkextlib/tcllib/tooltip.rb +1 -1
  236. data/lib/tkextlib/tcllib/validator.rb +1 -1
  237. data/lib/tkextlib/tcllib/widget.rb +1 -1
  238. data/lib/tkextlib/tcllib.rb +1 -1
  239. data/lib/tkextlib/tclx/tclx.rb +1 -1
  240. data/lib/tkextlib/tile/dialog.rb +1 -1
  241. data/lib/tkextlib/tile/sizegrip.rb +1 -1
  242. data/lib/tkextlib/tile/style.rb +1 -1
  243. data/lib/tkextlib/tile/tbutton.rb +1 -1
  244. data/lib/tkextlib/tile/tcheckbutton.rb +1 -1
  245. data/lib/tkextlib/tile/tcombobox.rb +1 -1
  246. data/lib/tkextlib/tile/tentry.rb +1 -1
  247. data/lib/tkextlib/tile/tframe.rb +1 -1
  248. data/lib/tkextlib/tile/tlabel.rb +1 -1
  249. data/lib/tkextlib/tile/tlabelframe.rb +1 -1
  250. data/lib/tkextlib/tile/tmenubutton.rb +1 -1
  251. data/lib/tkextlib/tile/tnotebook.rb +1 -1
  252. data/lib/tkextlib/tile/tpaned.rb +1 -1
  253. data/lib/tkextlib/tile/tprogressbar.rb +1 -1
  254. data/lib/tkextlib/tile/tradiobutton.rb +1 -1
  255. data/lib/tkextlib/tile/treeview.rb +1 -1
  256. data/lib/tkextlib/tile/tscale.rb +1 -1
  257. data/lib/tkextlib/tile/tscrollbar.rb +1 -1
  258. data/lib/tkextlib/tile/tseparator.rb +1 -1
  259. data/lib/tkextlib/tile/tspinbox.rb +1 -1
  260. data/lib/tkextlib/tile/tsquare.rb +1 -1
  261. data/lib/tkextlib/tile.rb +1 -1
  262. data/lib/tkextlib/tkDND/shape.rb +1 -1
  263. data/lib/tkextlib/tkDND/tkdnd.rb +1 -1
  264. data/lib/tkextlib/tkDND.rb +1 -1
  265. data/lib/tkextlib/tkHTML/htmlwidget.rb +1 -1
  266. data/lib/tkextlib/tkimg/bmp.rb +1 -1
  267. data/lib/tkextlib/tkimg/dted.rb +1 -1
  268. data/lib/tkextlib/tkimg/gif.rb +1 -1
  269. data/lib/tkextlib/tkimg/ico.rb +1 -1
  270. data/lib/tkextlib/tkimg/jpeg.rb +1 -1
  271. data/lib/tkextlib/tkimg/pcx.rb +1 -1
  272. data/lib/tkextlib/tkimg/pixmap.rb +1 -1
  273. data/lib/tkextlib/tkimg/png.rb +1 -1
  274. data/lib/tkextlib/tkimg/ppm.rb +1 -1
  275. data/lib/tkextlib/tkimg/ps.rb +1 -1
  276. data/lib/tkextlib/tkimg/raw.rb +1 -1
  277. data/lib/tkextlib/tkimg/sgi.rb +1 -1
  278. data/lib/tkextlib/tkimg/sun.rb +1 -1
  279. data/lib/tkextlib/tkimg/tga.rb +1 -1
  280. data/lib/tkextlib/tkimg/tiff.rb +1 -1
  281. data/lib/tkextlib/tkimg/window.rb +1 -1
  282. data/lib/tkextlib/tkimg/xbm.rb +1 -1
  283. data/lib/tkextlib/tkimg/xpm.rb +1 -1
  284. data/lib/tkextlib/tkimg.rb +1 -1
  285. data/lib/tkextlib/tktable/tktable.rb +1 -1
  286. data/lib/tkextlib/tktable.rb +1 -1
  287. data/lib/tkextlib/tktrans/tktrans.rb +1 -1
  288. data/lib/tkextlib/tktrans.rb +1 -1
  289. data/lib/tkextlib/treectrl/tktreectrl.rb +2 -2
  290. data/lib/tkextlib/trofs/trofs.rb +1 -1
  291. data/lib/tkextlib/vu/bargraph.rb +1 -1
  292. data/lib/tkextlib/vu/charts.rb +1 -1
  293. data/lib/tkextlib/vu/dial.rb +1 -1
  294. data/lib/tkextlib/vu/pie.rb +1 -1
  295. data/lib/tkextlib/vu/spinbox.rb +1 -1
  296. data/lib/tkextlib/vu.rb +1 -1
  297. data/lib/tkextlib/winico/winico.rb +1 -1
  298. data/lib/tkextlib/winico.rb +1 -1
  299. data/sample/demos-en/knightstour.rb +1 -0
  300. data/sample/demos-jp/knightstour.rb +1 -0
  301. data/sample/demos-jp/widget +4 -4
  302. data/sample/irbtk.rb +2 -0
  303. data/sample/irbtkw.rbw +13 -4
  304. data/sample/tktextio.rb +7 -3
  305. data/tk.gemspec +1 -1
  306. metadata +6 -7
  307. data/.travis.yml +0 -6
@@ -3,7 +3,7 @@
3
3
  # winico -- Windows Icon extension support
4
4
  # by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
5
5
  #
6
- require 'tk'
6
+ require 'tk' unless defined?(Tk)
7
7
 
8
8
  # call setup script for general 'tkextlib' libraries
9
9
  require 'tkextlib/setup.rb'
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env ruby -r thread_tk
1
2
  # frozen_string_literal: false
2
3
  # Based on the widget demo of Tcl/Tk8.5.2
3
4
  # The following is the original copyright text.
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env ruby -r thread_tk
1
2
  # -*- coding: utf-8 -*-
2
3
  # frozen_string_literal: false
3
4
  #
@@ -4,9 +4,9 @@
4
4
  # 漢字コード設定 ( tk.rb のロード時の encoding 推定/設定に使われる )
5
5
  #if RUBY_VERSION < '1.9.0' ### !!!!!!!!!!!!!!
6
6
  unless defined?(::Encoding.default_external)
7
- $KCODE = 'euc'
7
+ $KCODE = 'utf-8'
8
8
  else
9
- DEFAULT_TK_ENCODING = 'EUC-JP'
9
+ DEFAULT_TK_ENCODING = 'utf-8'
10
10
  end
11
11
 
12
12
  # tk 関係ライブラリの読み込み
@@ -888,7 +888,7 @@ def showCode1(demo)
888
888
  $code_window.iconname(file)
889
889
  code = open([$demo_dir, file].join(File::Separator), 'r'){|fid| fid.read }
890
890
  $code_text.delete('1.0', 'end')
891
- code.force_encoding('EUC-JP') if defined?(::Encoding.default_external)
891
+ code.force_encoding('utf-8') if defined?(::Encoding.default_external)
892
892
  $code_text.insert('1.0', code)
893
893
  TkTextMarkInsert.new($code_text,'1.0')
894
894
  $set_linenum.call($code_text)
@@ -974,7 +974,7 @@ def showCode2(demo)
974
974
  $code_window.iconname(file)
975
975
  code = open([$demo_dir, file].join(File::Separator), 'r'){|fid| fid.read }
976
976
  $code_text.delete('1.0', 'end')
977
- code.force_encoding('EUC-JP') if defined?(::Encoding.default_external)
977
+ code.force_encoding('utf-8') if defined?(::Encoding.default_external)
978
978
  $code_text.insert('1.0', code)
979
979
  TkTextMarkInsert.new($code_text,'1.0')
980
980
  $set_linenum.call($code_text)
data/sample/irbtk.rb CHANGED
@@ -9,6 +9,8 @@
9
9
  # 'remote-tk.rb' includes 'multi-tk.rb'.
10
10
  # ( There is no trouble even if you give both options. )
11
11
  #
12
+ require "thread_tk"
13
+
12
14
  require 'remote-tk' if ARGV.delete('--remote-tk')
13
15
  require 'multi-tk' if ARGV.delete('--multi-tk')
14
16
 
data/sample/irbtkw.rbw CHANGED
@@ -6,6 +6,7 @@
6
6
  #
7
7
  release = '2008/03/08'
8
8
 
9
+ require 'thread_tk'
9
10
  require 'tk'
10
11
  begin
11
12
  require 'tktextio'
@@ -13,8 +14,6 @@ rescue LoadError
13
14
  require File.join(File.dirname(File.expand_path(__FILE__)), 'tktextio.rb')
14
15
  end
15
16
 
16
- require 'irb'
17
-
18
17
  if TkCore::WITH_ENCODING
19
18
  else
20
19
  # $KCODE setup
@@ -110,8 +109,15 @@ def STDIN.tty?
110
109
  end
111
110
 
112
111
  # IRB setup
112
+ require 'irb'
113
+
113
114
  IRB.init_config(nil)
114
115
  IRB.conf[:USE_READLINE] = false
116
+ IRB.conf[:USE_MULTILINE] = false
117
+ IRB.conf[:USE_SINGLELINE] = false
118
+ IRB.conf[:USE_COLORIZE] = false
119
+ IRB.conf[:PROMPT_MODE] = :DEFAULT
120
+ IRB.conf[:VERBOSE] = false
115
121
  IRB.init_error
116
122
  irb = IRB::Irb.new
117
123
  IRB.conf[:MAIN_CONTEXT] = irb.context
@@ -152,5 +158,8 @@ console.bind('Control-c'){
152
158
  irb_thread.join
153
159
 
154
160
  # exit
155
- ev_loop.kill
156
- Tk.exit
161
+ begin
162
+ ev_loop.kill
163
+ Tk.exit
164
+ rescue
165
+ end
data/sample/tktextio.rb CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env ruby
1
+ #!/usr/bin/env ruby -r thread_tk
2
2
  # frozen_string_literal: false
3
3
  #
4
4
  # TkTextIO class :: handling I/O stream on a TkText widget
@@ -395,6 +395,10 @@ class TkTextIO < TkText
395
395
 
396
396
  ####################################
397
397
 
398
+ def set_encoding(extern, intern = nil)
399
+ # not suppot -> do nothing
400
+ end
401
+
398
402
  def <<(obj)
399
403
  _write(obj)
400
404
  self
@@ -592,7 +596,7 @@ class TkTextIO < TkText
592
596
 
593
597
  def putc(c)
594
598
  _check_writable
595
- c = c.chr if c.kind_of?(Fixnum)
599
+ c = c.chr if c.kind_of?(Integer)
596
600
  _write(c)
597
601
  c
598
602
  end
@@ -850,7 +854,7 @@ class TkTextIO < TkText
850
854
  end
851
855
 
852
856
  _check_readable
853
- c = c.chr if c.kind_of?(Fixnum)
857
+ c = c.chr if c.kind_of?(Integer)
854
858
  if compare(@txtpos, '>', '1.0')
855
859
  @txtpos.set(@txtpos - '1 char')
856
860
  delete(@txtpos)
data/tk.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "tk"
3
- spec.version = "0.4.0"
3
+ spec.version = "0.5.1"
4
4
  spec.authors = ["SHIBATA Hiroshi", "Nobuyoshi Nakada", "Jeremy Evans"]
5
5
  spec.email = ["hsbt@ruby-lang.org", "nobu@ruby-lang.org", "code@jeremyevans.net"]
6
6
 
metadata CHANGED
@@ -1,16 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - SHIBATA Hiroshi
8
8
  - Nobuyoshi Nakada
9
9
  - Jeremy Evans
10
- autorequire:
11
10
  bindir: exe
12
11
  cert_chain: []
13
- date: 2021-03-26 00:00:00.000000000 Z
12
+ date: 2025-01-10 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: bundler
@@ -65,8 +64,9 @@ extensions:
65
64
  - ext/tk/tkutil/extconf.rb
66
65
  extra_rdoc_files: []
67
66
  files:
67
+ - ".github/dependabot.yml"
68
+ - ".github/workflows/test.yml"
68
69
  - ".gitignore"
69
- - ".travis.yml"
70
70
  - BSDL
71
71
  - Gemfile
72
72
  - LICENSE.txt
@@ -93,6 +93,7 @@ files:
93
93
  - lib/multi-tk.rb
94
94
  - lib/remote-tk.rb
95
95
  - lib/tcltk.rb
96
+ - lib/thread_tk.rb
96
97
  - lib/tk.rb
97
98
  - lib/tk/after.rb
98
99
  - lib/tk/autoload.rb
@@ -1120,7 +1121,6 @@ licenses:
1120
1121
  - BSD-2-Clause
1121
1122
  metadata:
1122
1123
  msys2_mingw_dependencies: tk
1123
- post_install_message:
1124
1124
  rdoc_options: []
1125
1125
  require_paths:
1126
1126
  - lib
@@ -1135,8 +1135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1135
1135
  - !ruby/object:Gem::Version
1136
1136
  version: '0'
1137
1137
  requirements: []
1138
- rubygems_version: 3.2.3
1139
- signing_key:
1138
+ rubygems_version: 3.6.2
1140
1139
  specification_version: 4
1141
1140
  summary: Tk interface module using tcltklib.
1142
1141
  test_files: []
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - ruby-head
4
- before_install:
5
- - sudo apt-get install tk tk-dev
6
- - gem install bundler --no-document