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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e1347bf6638e8e5c8ad7de473d26b0c8b3d2f4b8a2c195696c24c19d652cb426
4
- data.tar.gz: c52bc29bd1d742bc707c7d53f82c564355c32c43dd64e19a2b4df8ed63b9bbab
3
+ metadata.gz: 2daffd367a147178f4e0f2144ada2fa9b697d3f3a691feb35cbc0dd2897d5096
4
+ data.tar.gz: c77e8a1a311131c912dd1abfd877479dfe5284e1392aa74ff654d9bcad21a245
5
5
  SHA512:
6
- metadata.gz: 47633e9b2b38bbde90c157d6fec882ea7747180de3ac28bbec7d0d8671ec709cf9a0cdff5335186e192b3fdf72c7f4b6de68479b8307d6ea426ba47e3de35482
7
- data.tar.gz: 7fb2f1dea579e612ea57eddd8136f855c68b4845d550559c136ca5e92e8c4af1fe437544721763b71f50df5d60e0c19de7ea01f4eb602e7cf177862cc94d0381
6
+ metadata.gz: 769d8de0a68b1e1f3ce86a74723d62b1e969cd0e2558f32ee0042c13a57c0c63f36fa8fe0aeb1f9c2a9a6fc2fbb1fa879c3013a83e247f8145b1b0873a8fea09
7
+ data.tar.gz: b7a29534b49f7fcb5f53390ed98fee637f8b9cf8a347b4a0d68a1edc6d951a16214074d007dab4204a59ee2a37eae383cb9fc4180d0aba179a5751edac62a6eb
@@ -0,0 +1,6 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: 'github-actions'
4
+ directory: '/'
5
+ schedule:
6
+ interval: 'weekly'
@@ -0,0 +1,29 @@
1
+ name: build
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ name: build (${{ matrix.ruby }}
8
+ strategy:
9
+ matrix:
10
+ ruby: [ 3.4, 3.3, 3.2, 3.1, head ]
11
+ runs-on: ubuntu-20.04
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - name: Set up Ruby
15
+ uses: ruby/setup-ruby@v1
16
+ with:
17
+ ruby-version: ${{ matrix.ruby }}
18
+ - name: Install dependencies
19
+ run: |
20
+ sudo apt install tk-dev
21
+ gem install bundler --no-document
22
+ bundle install
23
+ - name: Run test
24
+ run: |
25
+ rake compile -- --with-tcltkversion=8.6 \
26
+ --with-tcl-lib=/usr/lib/x86_64-linux-gnu \
27
+ --with-tk-lib=/usr/lib/x86_64-linux-gnu \
28
+ --with-tcl-include=/usr/include/tcl8.6 \
29
+ --with-tk-include=/usr/include/tcl8.6
data/MANUAL_tcltklib.ja CHANGED
@@ -135,7 +135,7 @@ require "tcltklib" すると, 以下のモジュール, クラスが利用可能
135
135
  メソッド _return_value()
136
136
  直前の Tcl_Eval の戻り値を返します. 0(TCL_OK) で正常終了です.
137
137
  引数: 無し
138
- 戻り値 (Fixnum): 直前の Tcl_Eval() が返した値.
138
+ 戻り値 (Integer): 直前の Tcl_Eval() が返した値.
139
139
 
140
140
  ==============================================================
141
141
 
data/README.macosx-aqua CHANGED
@@ -31,7 +31,7 @@ Tk.ip_eval(<<'EOS')
31
31
  }
32
32
  EOS
33
33
 
34
- # use a traditional dialog for Tk.getSaveFile() and Tk.getMultipleSaveFile()
34
+ # use a traditional dialog for Tk.getSaveFile()
35
35
  Tk.ip_eval(<<'EOS')
36
36
  proc ::tk_getSaveFile {args} {
37
37
  if {$::tk_strictMotif} {
data/README.md CHANGED
@@ -18,6 +18,14 @@ Or install it yourself as:
18
18
 
19
19
  $ gem install tk
20
20
 
21
+ You may need to set options when using `gem install` so that the gem can find the Tcl/Tk headers and library:
22
+
23
+ $ gem install tk -- \
24
+ --with-tcl-include='/path/to/tcl/header/directory' \
25
+ --with-tk-include='/path/to/tk/header/directory' \
26
+ --with-tcl-lib='/path/to/tcl/shared/library/directory' \
27
+ --with-tk-lib='/path/to/tk/shared/library/directory'
28
+
21
29
  ## Documentation
22
30
 
23
31
  ### Read this first
data/ext/tk/extconf.rb CHANGED
@@ -510,9 +510,9 @@ def get_tclConfig_dirs
510
510
  '/usr/local/opt', '/usr/local/pkg', '/usr/local/share', '/usr/local',
511
511
  '/usr/opt', '/usr/pkg', '/usr/share', '/usr/contrib', '/usr'
512
512
  ].map{|dir|
513
- Dir.glob(dir + "/{tcltk,tcl,tk}[#{TkLib_Config['major_nums']}*/lib",
513
+ Dir.glob(dir + "/{tcltk,tcl,tk}[#{TkLib_Config['major_nums']}]*/lib",
514
514
  File::FNM_CASEFOLD)
515
- Dir.glob(dir + "/{tcltk,tcl,tk}[#{TkLib_Config['major_nums']}*",
515
+ Dir.glob(dir + "/{tcltk,tcl,tk}[#{TkLib_Config['major_nums']}]*",
516
516
  File::FNM_CASEFOLD)
517
517
  Dir.glob(dir + '/{tcltk,tcl,tk}/lib', File::FNM_CASEFOLD)
518
518
  Dir.glob(dir + '/{tcltk,tcl,tk}', File::FNM_CASEFOLD)
@@ -327,7 +327,7 @@ tk_symbolkey2str(self, keys)
327
327
 
328
328
  if (NIL_P(keys)) return new_keys;
329
329
  keys = rb_convert_type(keys, T_HASH, "Hash", "to_hash");
330
- st_foreach_check(RHASH_TBL(keys), to_strkey, new_keys, Qundef);
330
+ rb_hash_foreach(keys, to_strkey, new_keys);
331
331
  return new_keys;
332
332
  }
333
333
 
@@ -718,7 +718,7 @@ hash2kv(hash, ary, self)
718
718
  volatile VALUE dst = rb_ary_new2(2 * RHASH_SIZE(hash));
719
719
  volatile VALUE args = rb_ary_new3(2, dst, self);
720
720
 
721
- st_foreach_check(RHASH_TBL(hash), push_kv, args, Qundef);
721
+ rb_hash_foreach(hash, push_kv, args);
722
722
 
723
723
  if (NIL_P(ary)) {
724
724
  return dst;
@@ -762,7 +762,7 @@ hash2kv_enc(hash, ary, self)
762
762
  volatile VALUE dst = rb_ary_new2(2 * RHASH_SIZE(hash));
763
763
  volatile VALUE args = rb_ary_new3(2, dst, self);
764
764
 
765
- st_foreach_check(RHASH_TBL(hash), push_kv_enc, args, Qundef);
765
+ rb_hash_foreach(hash, push_kv_enc, args);
766
766
 
767
767
  if (NIL_P(ary)) {
768
768
  return dst;
@@ -1067,14 +1067,14 @@ static VALUE
1067
1067
  tkstr_to_int(value)
1068
1068
  VALUE value;
1069
1069
  {
1070
- return rb_cstr_to_inum(RSTRING_PTR(value), 0, 1);
1070
+ return rb_str_to_inum(value, 0, 1);
1071
1071
  }
1072
1072
 
1073
1073
  static VALUE
1074
1074
  tkstr_to_float(value)
1075
1075
  VALUE value;
1076
1076
  {
1077
- return rb_float_new(rb_cstr_to_dbl(RSTRING_PTR(value), 1));
1077
+ return rb_float_new(rb_str_to_dbl(value, 1));
1078
1078
  }
1079
1079
 
1080
1080
  static VALUE
@@ -1797,6 +1797,7 @@ Init_tkutil(void)
1797
1797
  rb_define_singleton_method(cCB_SUBST, "inspect", cbsubst_inspect, 0);
1798
1798
 
1799
1799
  cSUBST_INFO = rb_define_class_under(cCB_SUBST, "Info", rb_cObject);
1800
+ rb_undef_alloc_func(cSUBST_INFO);
1800
1801
  rb_define_singleton_method(cSUBST_INFO, "inspect", substinfo_inspect, 0);
1801
1802
 
1802
1803
  ID_SUBST_INFO = rb_intern("SUBST_INFO");
data/lib/multi-tk.rb CHANGED
@@ -1279,7 +1279,7 @@ class MultiTkIp
1279
1279
 
1280
1280
  name, safe, safe_opts, tk_opts = _parse_slaveopts(keys)
1281
1281
 
1282
- safe = 1 if safe && !safe.kind_of?(Fixnum)
1282
+ safe = 1 if safe && !safe.kind_of?(Integer)
1283
1283
 
1284
1284
  @safe_base = false
1285
1285
 
@@ -3519,4 +3519,4 @@ end
3519
3519
  module TkCore
3520
3520
  INTERP = MultiTkIp
3521
3521
  end
3522
- require 'tk'
3522
+ require 'tk' unless defined?(Tk)
data/lib/thread_tk.rb ADDED
@@ -0,0 +1,13 @@
1
+ #
2
+ # thread_tk.rb :
3
+ # The eventloop of Tk (Tk.mainloop) can run on a thread other than the
4
+ # main thread. That is, when "require 'thread_tk'" is executed instead
5
+ # of or before "require 'tk'", "Thread.new{Tk.mainloop}" works properly.
6
+ #
7
+
8
+ if defined?(TkCore::RUN_EVENTLOOP_ON_MAIN_THREAD) && TkCore::RUN_EVENTLOOP_ON_MAIN_THREAD
9
+ raise LoadError, "thread_tk.rb must be loaded before tk.rb"
10
+ end
11
+
12
+ module TkCore; RUN_EVENTLOOP_ON_MAIN_THREAD = false; end
13
+ require 'tk' unless defined?(Tk)
data/lib/tk/bgerror.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  # tkbgerror -- bgerror ( tkerror ) module
4
4
  # 1998/07/16 by Hidetoshi Nagai <nagai@ai.kyutech.ac.jp>
5
5
  #
6
- require 'tk'
6
+ require 'tk' unless defined?(Tk)
7
7
 
8
8
  module TkBgError
9
9
  extend Tk
data/lib/tk/bindtag.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/bind.rb : control event binding
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
 
7
7
  class TkBindTag
8
8
  include TkBindCore
data/lib/tk/busy.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/busy.rb: support 'tk busy' command (Tcl/Tk8.6 or later)
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
 
7
7
  module Tk::Busy
8
8
  include TkCore
data/lib/tk/button.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/button.rb : treat button widget
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
  require 'tk/label'
7
7
 
8
8
  class Tk::Button<Tk::Label
data/lib/tk/canvas.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  # tk/canvas.rb - Tk canvas classes
4
4
  # by Yukihiro Matsumoto <matz@caelum.co.jp>
5
5
  #
6
- require 'tk'
6
+ require 'tk' unless defined?(Tk)
7
7
  require 'tk/canvastag'
8
8
  require 'tk/itemconfig'
9
9
  require 'tk/scrollable'
data/lib/tk/canvastag.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/canvastag.rb - methods for treating canvas tags
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
  require 'tk/tagfont'
7
7
 
8
8
  module TkcTagAccess
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/checkbutton.rb : treat checkbutton widget
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
  require 'tk/radiobutton'
7
7
 
8
8
  class Tk::CheckButton<Tk::RadioButton
data/lib/tk/clipboard.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/clipboard.rb : methods to treat clipboard
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
 
7
7
  module TkClipboard
8
8
  include Tk
data/lib/tk/clock.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/clock.rb : methods for clock command
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
 
7
7
  module Tk
8
8
  module Clock
data/lib/tk/composite.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/composite.rb :
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
 
7
7
  module TkComposite
8
8
  include Tk
data/lib/tk/console.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/console.rb : control the console on system without a real console
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
 
7
7
  module TkConsole
8
8
  include Tk
data/lib/tk/dialog.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/dialog.rb : create dialog boxes
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
  require 'tk/variable.rb'
7
7
 
8
8
  class TkDialogObj < TkWindow
data/lib/tk/encodedstr.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/encodedstr.rb : Tk::EncodedString class
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
 
7
7
  ###########################################
8
8
  # string with Tcl's encoding
data/lib/tk/entry.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  # tk/entry.rb - Tk entry classes
4
4
  # by Yukihiro Matsumoto <matz@caelum.co.jp>
5
5
 
6
- require 'tk'
6
+ require 'tk' unless defined?(Tk)
7
7
  require 'tk/label'
8
8
  require 'tk/scrollable'
9
9
  require 'tk/validation'
data/lib/tk/font.rb CHANGED
@@ -4,7 +4,7 @@
4
4
  #
5
5
  # by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
6
6
  #
7
- require 'tk'
7
+ require 'tk' unless defined?(Tk)
8
8
 
9
9
  class TkFont
10
10
  include Tk
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/fontchooser.rb -- "tk fontchooser" support (Tcl/Tk8.6 or later)
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
  require 'tk/font'
7
7
 
8
8
  module TkFont::Chooser
data/lib/tk/frame.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/frame.rb : treat frame widget
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
 
7
7
  class Tk::Frame<TkWindow
8
8
  TkCommandNames = ['frame'.freeze].freeze
data/lib/tk/grid.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/grid.rb : control grid geometry manager
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
 
7
7
  module TkGrid
8
8
  include Tk
data/lib/tk/image.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  # tk/image.rb : treat Tk image objects
4
4
  #
5
5
 
6
- require 'tk'
6
+ require 'tk' unless defined?(Tk)
7
7
 
8
8
  class TkImage<TkObject
9
9
  include Tk
data/lib/tk/itemconfig.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/itemconfig.rb : control item/tag configuration of widget
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
  require 'tkutil'
7
7
  require 'tk/itemfont.rb'
8
8
 
data/lib/tk/itemfont.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/itemfont.rb : control font of widget items
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
 
7
7
  module TkItemFontOptkeys
8
8
  def __item_font_optkeys(id)
data/lib/tk/kinput.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/kinput.rb : control kinput
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
 
7
7
  module TkKinput
8
8
  include Tk
data/lib/tk/label.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/label.rb : treat label widget
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
 
7
7
  class Tk::Label<TkWindow
8
8
  TkCommandNames = ['label'.freeze].freeze
data/lib/tk/labelframe.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/labelframe.rb : treat labelframe widget
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
  require 'tk/frame'
7
7
 
8
8
  class Tk::LabelFrame<Tk::Frame
data/lib/tk/listbox.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/listbox.rb : treat listbox widget
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
  require 'tk/itemconfig'
7
7
  require 'tk/scrollable'
8
8
  require 'tk/txtwin_abst'
data/lib/tk/macpkg.rb CHANGED
@@ -7,7 +7,7 @@
7
7
  # This is NOT TESTED. Because I have no test-environment.
8
8
  #
9
9
  #
10
- require 'tk'
10
+ require 'tk' unless defined?(Tk)
11
11
 
12
12
  module Tk
13
13
  def Tk.load_tclscript_rsrc(resource_name, file=None)
data/lib/tk/menu.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/menu.rb : treat menu and menubutton
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
  require 'tk/itemconfig'
7
7
  require 'tk/menuspec'
8
8
 
data/lib/tk/menubar.rb CHANGED
@@ -85,7 +85,7 @@
85
85
  # To use add_menu, configuration must be done by calling configure after
86
86
  # adding all menus by add_menu, not by the constructor arguments.
87
87
 
88
- require 'tk'
88
+ require 'tk' unless defined?(Tk)
89
89
  require 'tk/frame'
90
90
  require 'tk/composite'
91
91
  require 'tk/menuspec'
data/lib/tk/message.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/message.rb : treat message widget
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
  require 'tk/label'
7
7
 
8
8
  class Tk::Message<Tk::Label
data/lib/tk/mngfocus.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  # tk/mngfocus.rb : methods for Tcl/Tk standard library 'focus.tcl'
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
  module TkManageFocus
9
9
  extend Tk
data/lib/tk/msgcat.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  # tk/msgcat.rb : methods for Tcl message catalog
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
  #class TkMsgCatalog
9
9
  class TkMsgCatalog < TkObject
data/lib/tk/namespace.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  # tk/namespace.rb : methods to manipulate Tcl/Tk namespace
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
  class TkNamespace < TkObject
9
9
  extend Tk
data/lib/tk/optiondb.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/optiondb.rb : treat option database
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
 
7
7
  module TkOptionDB
8
8
  include Tk
data/lib/tk/optionobj.rb CHANGED
@@ -8,7 +8,7 @@
8
8
  # e.g. hash_kv({'aaa'=>1, 'bbb'=>Tk::None, 'ccc'=>3})
9
9
  # => ["-aaa", 1, "-bbb", "-ccc", 3]
10
10
  #
11
- require 'tk'
11
+ require 'tk' unless defined?(Tk)
12
12
 
13
13
  module Tk
14
14
  class OptionObj < Hash
data/lib/tk/pack.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/pack.rb : control pack geometry manager
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
 
7
7
  module TkPack
8
8
  include Tk
data/lib/tk/package.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/package.rb : package command
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
 
7
7
  module TkPackage
8
8
  include TkCore
data/lib/tk/palette.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  # tk/palette.rb : methods for Tcl/Tk standard library 'palette.tcl'
4
4
  # 1998/06/21 by Hidetoshi Nagai <nagai@ai.kyutech.ac.jp>
5
5
  #
6
- require 'tk'
6
+ require 'tk' unless defined?(Tk)
7
7
 
8
8
  module TkPalette
9
9
  include Tk
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/panedwindow.rb : treat panedwindow
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
 
7
7
  class Tk::PanedWindow<TkWindow
8
8
  TkCommandNames = ['panedwindow'.freeze].freeze
data/lib/tk/place.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/place.rb : control place geometry manager
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
 
7
7
  module TkPlace
8
8
  include Tk
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/radiobutton.rb : treat radiobutton widget
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
  require 'tk/button'
7
7
 
8
8
  class Tk::RadioButton<Tk::Button
data/lib/tk/root.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/root.rb : treat root widget
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
  require 'tk/wm'
7
7
  require 'tk/menuspec'
8
8
 
data/lib/tk/scale.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/scale.rb : treat scale widget
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
 
7
7
  class Tk::Scale<TkWindow
8
8
  TkCommandNames = ['scale'.freeze].freeze
data/lib/tk/scrollable.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/scrollable.rb : module for scrollable widget
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
 
7
7
  module Tk
8
8
  module XScrollable
data/lib/tk/scrollbar.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/scrollbar.rb : treat scrollbar widget
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
 
7
7
  class Tk::Scrollbar<TkWindow
8
8
  TkCommandNames = ['scrollbar'.freeze].freeze
data/lib/tk/scrollbox.rb CHANGED
@@ -4,7 +4,7 @@
4
4
  # as an example of Composite Widget
5
5
  # by Yukihiro Matsumoto <matz@netlab.co.jp>
6
6
  #
7
- require 'tk'
7
+ require 'tk' unless defined?(Tk)
8
8
  require 'tk/listbox'
9
9
 
10
10
  class TkScrollbox<Tk::Listbox
data/lib/tk/selection.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # tk/selection.rb : control selection
4
4
  #
5
- require 'tk'
5
+ require 'tk' unless defined?(Tk)
6
6
 
7
7
  module TkSelection
8
8
  include Tk