ffi-tk 2010.08.23 → 2018.02.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (199) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +2 -0
  3. data/.rubocop.yml +7 -0
  4. data/.rubocop_todo.yml +371 -0
  5. data/AUTHORS +4 -2
  6. data/CHANGELOG +302 -262
  7. data/Gemfile +10 -0
  8. data/Gemfile.lock +45 -0
  9. data/MANIFEST +6 -6
  10. data/README.md +1 -1
  11. data/Rakefile +12 -11
  12. data/bin/rwish +6 -5
  13. data/example/choose_color.rb +5 -4
  14. data/example/choose_directory.rb +5 -4
  15. data/example/dialog.rb +9 -8
  16. data/example/hello.rb +2 -1
  17. data/example/message_box.rb +8 -5
  18. data/example/option_menu.rb +4 -3
  19. data/example/popup.rb +4 -3
  20. data/example/set_palette.rb +5 -4
  21. data/example/text.rb +30 -30
  22. data/example/tile/kroc_demo_small.rb +51 -55
  23. data/example/tile/kroc_rb_demo.rb +74 -83
  24. data/example/tile/notebook.rb +6 -9
  25. data/example/tile/theme_hello.rb +6 -8
  26. data/example/tile/themes.rb +4 -2
  27. data/example/tile/treeview.rb +16 -14
  28. data/example/tkgo.rb +120 -88
  29. data/example/various.rb +8 -7
  30. data/example/wait.rb +3 -2
  31. data/ffi-tk.gemspec +21 -20
  32. data/gemset.nix +134 -0
  33. data/lib/ffi-tk.rb +10 -11
  34. data/lib/ffi-tk/command.rb +3 -2
  35. data/lib/ffi-tk/command/after.rb +8 -7
  36. data/lib/ffi-tk/command/bell.rb +2 -1
  37. data/lib/ffi-tk/command/bind.rb +1 -0
  38. data/lib/ffi-tk/command/bindtags.rb +1 -0
  39. data/lib/ffi-tk/command/cget.rb +31 -24
  40. data/lib/ffi-tk/command/choose_color.rb +2 -1
  41. data/lib/ffi-tk/command/choose_directory.rb +2 -1
  42. data/lib/ffi-tk/command/clipboard.rb +6 -5
  43. data/lib/ffi-tk/command/configure.rb +23 -21
  44. data/lib/ffi-tk/command/destroy.rb +2 -1
  45. data/lib/ffi-tk/command/dialog.rb +4 -3
  46. data/lib/ffi-tk/command/event.rb +1 -0
  47. data/lib/ffi-tk/command/focus.rb +2 -1
  48. data/lib/ffi-tk/command/font.rb +12 -9
  49. data/lib/ffi-tk/command/get_open_file.rb +1 -0
  50. data/lib/ffi-tk/command/get_save_file.rb +1 -0
  51. data/lib/ffi-tk/command/grab.rb +2 -1
  52. data/lib/ffi-tk/command/grid.rb +7 -6
  53. data/lib/ffi-tk/command/image.rb +5 -4
  54. data/lib/ffi-tk/command/lower.rb +1 -0
  55. data/lib/ffi-tk/command/message_box.rb +2 -1
  56. data/lib/ffi-tk/command/option_menu.rb +3 -2
  57. data/lib/ffi-tk/command/pack.rb +5 -4
  58. data/lib/ffi-tk/command/place.rb +5 -4
  59. data/lib/ffi-tk/command/popup.rb +2 -1
  60. data/lib/ffi-tk/command/raise.rb +1 -0
  61. data/lib/ffi-tk/command/scrollable.rb +7 -10
  62. data/lib/ffi-tk/command/selection.rb +4 -3
  63. data/lib/ffi-tk/command/set_palette.rb +2 -1
  64. data/lib/ffi-tk/command/tk_cmd.rb +1 -0
  65. data/lib/ffi-tk/command/vars.rb +2 -1
  66. data/lib/ffi-tk/command/wait.rb +2 -1
  67. data/lib/ffi-tk/command/winfo.rb +9 -8
  68. data/lib/ffi-tk/command/wm.rb +11 -10
  69. data/lib/ffi-tk/core_extensions.rb +5 -4
  70. data/lib/ffi-tk/event/data.rb +32 -31
  71. data/lib/ffi-tk/event/handler.rb +4 -3
  72. data/lib/ffi-tk/ffi/tcl.rb +42 -31
  73. data/lib/ffi-tk/ffi/tcl/cmd_proc.rb +2 -1
  74. data/lib/ffi-tk/ffi/tcl/eval_result.rb +47 -8
  75. data/lib/ffi-tk/ffi/tcl/interp.rb +7 -4
  76. data/lib/ffi-tk/ffi/tcl/obj.rb +7 -32
  77. data/lib/ffi-tk/ffi/tcl/time.rb +2 -1
  78. data/lib/ffi-tk/ffi/tk.rb +8 -7
  79. data/lib/ffi-tk/geometry.rb +20 -17
  80. data/lib/ffi-tk/thread_sender.rb +1 -0
  81. data/lib/ffi-tk/tk.rb +23 -23
  82. data/lib/ffi-tk/variable.rb +25 -3
  83. data/lib/ffi-tk/version.rb +1 -1
  84. data/lib/ffi-tk/widget.rb +2 -1
  85. data/lib/ffi-tk/widget/button.rb +4 -1
  86. data/lib/ffi-tk/widget/canvas.rb +18 -15
  87. data/lib/ffi-tk/widget/canvas/arc.rb +2 -1
  88. data/lib/ffi-tk/widget/canvas/bitmap.rb +2 -1
  89. data/lib/ffi-tk/widget/canvas/image.rb +2 -1
  90. data/lib/ffi-tk/widget/canvas/item.rb +4 -4
  91. data/lib/ffi-tk/widget/canvas/line.rb +2 -1
  92. data/lib/ffi-tk/widget/canvas/oval.rb +2 -1
  93. data/lib/ffi-tk/widget/canvas/polygon.rb +2 -1
  94. data/lib/ffi-tk/widget/canvas/rectangle.rb +2 -1
  95. data/lib/ffi-tk/widget/canvas/text.rb +2 -1
  96. data/lib/ffi-tk/widget/canvas/window.rb +2 -1
  97. data/lib/ffi-tk/widget/checkbutton.rb +4 -1
  98. data/lib/ffi-tk/widget/entry.rb +4 -1
  99. data/lib/ffi-tk/widget/frame.rb +4 -1
  100. data/lib/ffi-tk/widget/label.rb +4 -1
  101. data/lib/ffi-tk/widget/labelframe.rb +4 -1
  102. data/lib/ffi-tk/widget/listbox.rb +5 -2
  103. data/lib/ffi-tk/widget/menu.rb +4 -1
  104. data/lib/ffi-tk/widget/menubutton.rb +4 -1
  105. data/lib/ffi-tk/widget/message.rb +4 -1
  106. data/lib/ffi-tk/widget/panedwindow.rb +5 -2
  107. data/lib/ffi-tk/widget/radiobutton.rb +4 -1
  108. data/lib/ffi-tk/widget/root.rb +1 -0
  109. data/lib/ffi-tk/widget/scale.rb +4 -1
  110. data/lib/ffi-tk/widget/scrollbar.rb +4 -1
  111. data/lib/ffi-tk/widget/spinbox.rb +4 -1
  112. data/lib/ffi-tk/widget/text.rb +20 -16
  113. data/lib/ffi-tk/widget/text/peer.rb +1 -0
  114. data/lib/ffi-tk/widget/tile.rb +2 -1
  115. data/lib/ffi-tk/widget/tile/button.rb +4 -1
  116. data/lib/ffi-tk/widget/tile/checkbutton.rb +4 -1
  117. data/lib/ffi-tk/widget/tile/combobox.rb +5 -2
  118. data/lib/ffi-tk/widget/tile/entry.rb +4 -1
  119. data/lib/ffi-tk/widget/tile/frame.rb +4 -1
  120. data/lib/ffi-tk/widget/tile/label.rb +4 -2
  121. data/lib/ffi-tk/widget/tile/labelframe.rb +4 -1
  122. data/lib/ffi-tk/widget/tile/menubutton.rb +4 -1
  123. data/lib/ffi-tk/widget/tile/notebook.rb +4 -1
  124. data/lib/ffi-tk/widget/tile/panedwindow.rb +4 -1
  125. data/lib/ffi-tk/widget/tile/progressbar.rb +4 -2
  126. data/lib/ffi-tk/widget/tile/radiobutton.rb +4 -1
  127. data/lib/ffi-tk/widget/tile/scale.rb +4 -1
  128. data/lib/ffi-tk/widget/tile/scrollbar.rb +7 -4
  129. data/lib/ffi-tk/widget/tile/separator.rb +4 -1
  130. data/lib/ffi-tk/widget/tile/sizegrip.rb +4 -1
  131. data/lib/ffi-tk/widget/tile/style.rb +16 -17
  132. data/lib/ffi-tk/widget/tile/treeview.rb +11 -5
  133. data/lib/ffi-tk/widget/toplevel.rb +4 -1
  134. data/shell.nix +19 -0
  135. data/spec/ffi-tk/command/bind.rb +5 -4
  136. data/spec/ffi-tk/command/bindtags.rb +2 -1
  137. data/spec/ffi-tk/command/clipboard.rb +4 -3
  138. data/spec/ffi-tk/command/font.rb +20 -19
  139. data/spec/ffi-tk/command/image.rb +13 -5
  140. data/spec/ffi-tk/command/pack.rb +3 -2
  141. data/spec/ffi-tk/command/place.rb +4 -3
  142. data/spec/ffi-tk/command/selection.rb +2 -1
  143. data/spec/ffi-tk/command/vars.rb +3 -2
  144. data/spec/ffi-tk/command/winfo.rb +10 -10
  145. data/spec/ffi-tk/command/wm.rb +23 -22
  146. data/spec/ffi-tk/event.rb +23 -21
  147. data/spec/ffi-tk/tile/button.rb +8 -8
  148. data/spec/ffi-tk/tile/checkbutton.rb +1 -1
  149. data/spec/ffi-tk/tile/combobox.rb +11 -12
  150. data/spec/ffi-tk/tile/entry.rb +18 -19
  151. data/spec/ffi-tk/tile/frame.rb +13 -13
  152. data/spec/ffi-tk/tile/label.rb +2 -2
  153. data/spec/ffi-tk/tile/labelframe.rb +1 -1
  154. data/spec/ffi-tk/tile/menubutton.rb +1 -1
  155. data/spec/ffi-tk/tile/notebook.rb +22 -20
  156. data/spec/ffi-tk/tile/panedwindow.rb +1 -1
  157. data/spec/ffi-tk/tile/progressbar.rb +1 -1
  158. data/spec/ffi-tk/tile/radiobutton.rb +1 -1
  159. data/spec/ffi-tk/tile/scale.rb +1 -1
  160. data/spec/ffi-tk/tile/scrollbar.rb +1 -16
  161. data/spec/ffi-tk/tile/separator.rb +2 -2
  162. data/spec/ffi-tk/tile/sizegrip.rb +1 -1
  163. data/spec/ffi-tk/tile/style.rb +63 -65
  164. data/spec/ffi-tk/tile/treeview.rb +11 -10
  165. data/spec/ffi-tk/variable.rb +5 -4
  166. data/spec/ffi-tk/widget/button.rb +3 -2
  167. data/spec/ffi-tk/widget/canvas.rb +59 -58
  168. data/spec/ffi-tk/widget/checkbutton.rb +6 -5
  169. data/spec/ffi-tk/widget/entry.rb +112 -103
  170. data/spec/ffi-tk/widget/frame.rb +2 -1
  171. data/spec/ffi-tk/widget/label.rb +2 -1
  172. data/spec/ffi-tk/widget/labelframe.rb +1 -0
  173. data/spec/ffi-tk/widget/listbox.rb +5 -4
  174. data/spec/ffi-tk/widget/menu.rb +3 -2
  175. data/spec/ffi-tk/widget/menubutton.rb +1 -0
  176. data/spec/ffi-tk/widget/message.rb +1 -0
  177. data/spec/ffi-tk/widget/panedwindow.rb +1 -0
  178. data/spec/ffi-tk/widget/radiobutton.rb +1 -0
  179. data/spec/ffi-tk/widget/root.rb +2 -1
  180. data/spec/ffi-tk/widget/scale.rb +1 -0
  181. data/spec/ffi-tk/widget/scrollbar.rb +1 -0
  182. data/spec/ffi-tk/widget/spinbox.rb +1 -0
  183. data/spec/ffi-tk/widget/text.rb +63 -54
  184. data/spec/ffi-tk/widget/toplevel.rb +1 -0
  185. data/spec/helper.rb +3 -1
  186. data/tasks/authors.rake +3 -2
  187. data/tasks/bacon.rake +13 -11
  188. data/tasks/changelog.rake +1 -0
  189. data/tasks/gem.rake +13 -11
  190. data/tasks/manifest.rake +2 -1
  191. data/tasks/release.rake +11 -32
  192. data/tasks/reversion.rake +2 -1
  193. metadata +52 -75
  194. data/spec/ffi-tk/command/grid.rb +0 -6
  195. data/tasks/gem_setup.rake +0 -113
  196. data/tasks/grancher.rake +0 -12
  197. data/tasks/rcov.rake +0 -17
  198. data/tasks/setup.rake +0 -12
  199. data/tasks/ycov.rake +0 -84
@@ -1,13 +1,15 @@
1
+ # frozen_string_literal: true
1
2
  require 'ffi-tk'
2
3
 
3
4
  Tk::Tile::Style.theme_names.each do |name|
4
5
  button = Tk::Tile::Button.new(
5
6
  text: name,
6
- command: ->{ Tk::Tile.set_theme(name) })
7
+ command: -> { Tk::Tile.set_theme(name) }
8
+ )
7
9
  button.pack side: :top, anchor: :nw
8
10
  end
9
11
 
10
- button = Tk::Tile::Button.new(text: 'Exit', command: ->{ Tk.exit })
12
+ button = Tk::Tile::Button.new(text: 'Exit', command: -> { Tk.exit })
11
13
  button.pack side: :top, anchor: :nw
12
14
 
13
15
  Tk.mainloop
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'ffi-tk'
2
3
  require 'find'
3
4
 
@@ -8,11 +9,11 @@ class FileTree < Tk::Tile::Treeview
8
9
 
9
10
  def populate_roots
10
11
  ## Create the tree and set it up
11
- configure columns: %w[fullpath type size], displaycolumns: %w[size]
12
+ configure columns: %w(fullpath type size), displaycolumns: %w(size)
12
13
  heading('#0', text: 'Directory Structure')
13
14
  heading('size', text: 'File Size')
14
15
  column('size', stretch: 0, width: 70)
15
- bind('<<TreeviewOpen>>'){|event|
16
+ bind('<<TreeviewOpen>>') do |_event|
16
17
  begin
17
18
  populate_tree(focus_item)
18
19
  rescue Exception => ex
@@ -20,7 +21,7 @@ class FileTree < Tk::Tile::Treeview
20
21
  end
21
22
 
22
23
  true
23
- }
24
+ end
24
25
 
25
26
  Tk.execute('file', 'volumes').sort.each do |volume|
26
27
  node = insert(nil, :end, text: volume, values: [volume, 'directory'])
@@ -35,7 +36,8 @@ class FileTree < Tk::Tile::Treeview
35
36
  delete(*node.children.to_a)
36
37
 
37
38
  Dir.glob File.join(path, '*') do |path|
38
- name, type = File.basename(path), File.ftype(path)
39
+ name = File.basename(path)
40
+ type = File.ftype(path)
39
41
 
40
42
  item = insert(node, :end, text: name, values: [path, type])
41
43
 
@@ -46,15 +48,15 @@ class FileTree < Tk::Tile::Treeview
46
48
  elsif type == 'file'
47
49
  size = File.size(path)
48
50
 
49
- if size >= GB
50
- size = '%.1f GB' % [size / GB]
51
- elsif size >= MB
52
- size = '%.1f MB' % [size / MB]
53
- elsif size >= KB
54
- size = '%.1f KB' % [size / KB]
55
- else
56
- size = '%.1f bytes' % [size]
57
- end
51
+ size = if size >= GB
52
+ '%.1f GB' % [size / GB]
53
+ elsif size >= MB
54
+ '%.1f MB' % [size / MB]
55
+ elsif size >= KB
56
+ '%.1f KB' % [size / KB]
57
+ else
58
+ '%.1f bytes' % [size]
59
+ end
58
60
 
59
61
  item.set(:size, size)
60
62
  end
@@ -63,7 +65,7 @@ class FileTree < Tk::Tile::Treeview
63
65
  end
64
66
 
65
67
  tree = FileTree.new
66
- tree.bind('<Escape>'){ Tk.exit }
68
+ tree.bind('<Escape>') { Tk.exit }
67
69
  tree.pack expand: true, fill: :both
68
70
  tree.focus
69
71
  tree.populate_roots
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Copyright (c) 2009 Michael Fellinger <m.fellinger@gmail.com>
2
3
  #
3
4
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -42,7 +43,9 @@ class TkGo
42
43
  cmd = "gnugo --mode gtp #{options.join(' ')}"
43
44
 
44
45
  Open3.popen3 cmd do |sin, sout, serr|
45
- @sin, @sout, @serr = sin, sout, serr
46
+ @sin = sin
47
+ @sout = sout
48
+ @serr = serr
46
49
  setup_widgets
47
50
  Tk.mainloop
48
51
  end
@@ -52,17 +55,17 @@ class TkGo
52
55
  Tk::Tile.set_theme 'clam'
53
56
 
54
57
  @frame = Tk::Tile::Frame.new
55
- @passb = Tk::Tile::Button.new(frame, text: 'Pass'){ clicked_field('pass') }
56
- @scoreb = Tk::Tile::Button.new(frame, text: 'Score'){ score }
57
- @undob = Tk::Tile::Button.new(frame, text: 'Undo'){
58
- 2.times{
59
- sin.puts("undo")
58
+ @passb = Tk::Tile::Button.new(frame, text: 'Pass') { clicked_field('pass') }
59
+ @scoreb = Tk::Tile::Button.new(frame, text: 'Score') { score }
60
+ @undob = Tk::Tile::Button.new(frame, text: 'Undo') do
61
+ 2.times do
62
+ sin.puts('undo')
60
63
  read_pipe
61
- }
64
+ end
62
65
  @white_history.pop
63
66
  @black_history.pop
64
67
  draw_pieces
65
- }
68
+ end
66
69
  @status = Tk::Tile::Label.new
67
70
  passb.pack(padx: 5, pady: 5, side: :left)
68
71
  scoreb.pack(padx: 5, pady: 5, side: :left)
@@ -70,17 +73,18 @@ class TkGo
70
73
  status.pack(side: :bottom, expand: true, fill: :both)
71
74
 
72
75
  Tk.root.wm_title = 'GO considered'
73
- Tk.root.bind('<Destroy>'){
74
- sin.puts("exit")
76
+ Tk.root.bind('<Destroy>') do
77
+ sin.puts('exit')
75
78
  exit
76
- }
79
+ end
77
80
 
78
81
  gobansize = linedist * (boardsize + 1)
79
82
  @goban = Tk::Canvas.new(
80
83
  Tk.root,
81
84
  height: gobansize,
82
85
  width: gobansize,
83
- background: '#eebb77')
86
+ background: '#eebb77'
87
+ )
84
88
  goban.pack(expand: true)
85
89
  frame.pack(expand: true)
86
90
  draw_board(goban)
@@ -88,7 +92,7 @@ class TkGo
88
92
 
89
93
  # NOTE: there is no I
90
94
  def x_to_letter(x)
91
- %w[A B C D E F G H J K L M N O P Q R S T][x]
95
+ %w(A B C D E F G H J K L M N O P Q R S T)[x]
92
96
  end
93
97
 
94
98
  def read_pipe
@@ -98,18 +102,18 @@ class TkGo
98
102
  end
99
103
 
100
104
  def draw_pieces
101
- sin.puts("list_stones black")
105
+ sin.puts('list_stones black')
102
106
  blacks = read_pipe
103
107
  blacks.shift
104
108
 
105
- sin.puts("list_stones white")
109
+ sin.puts('list_stones white')
106
110
  whites = read_pipe
107
111
  whites.shift
108
112
 
109
113
  goban.delete(:piece, :marker)
110
114
 
111
- blacks.each{|name| draw_piece(name, :black) }
112
- whites.each{|name| draw_piece(name, :white) }
115
+ blacks.each { |name| draw_piece(name, :black) }
116
+ whites.each { |name| draw_piece(name, :white) }
113
117
 
114
118
  draw_markers(blacks.any?, whites.any?)
115
119
  end
@@ -123,10 +127,10 @@ class TkGo
123
127
  end
124
128
 
125
129
  def draw_markers(blacks, whites)
126
- last_white = @white_history.reject{|name| name =~ /pass/i }.last
130
+ last_white = @white_history.reject { |name| name =~ /pass/i }.last
127
131
  draw_marker(last_white, :black) if whites && last_white
128
132
 
129
- last_black = @black_history.reject{|name| name =~ /pass/i }.last
133
+ last_black = @black_history.reject { |name| name =~ /pass/i }.last
130
134
  draw_marker(last_black, :white) if blacks && last_black
131
135
  end
132
136
 
@@ -145,7 +149,7 @@ class TkGo
145
149
 
146
150
  return if reply[0] == '?'
147
151
 
148
- sin.puts("genmove white")
152
+ sin.puts('genmove white')
149
153
  pos = read_pipe.last
150
154
  @white_history << pos
151
155
  status.value = "White: #{pos}"
@@ -157,7 +161,7 @@ class TkGo
157
161
  end
158
162
 
159
163
  def score
160
- sin.puts("final_score")
164
+ sin.puts('final_score')
161
165
  reply = read_pipe.last
162
166
  status.value = reply
163
167
  end
@@ -182,8 +186,9 @@ class TkGo
182
186
  # color = '#' << Array.new(3){ rand(255).to_s(16).rjust(2, '0') }.join
183
187
  color = nil
184
188
  board.create_rectangle(
185
- x1, y1, x2, y2, tags: [fieldname], outline: nil, fill: color)
186
- board.bind(fieldname, '<1>'){ clicked_field(fieldname) }
189
+ x1, y1, x2, y2, tags: [fieldname], outline: nil, fill: color
190
+ )
191
+ board.bind(fieldname, '<1>') { clicked_field(fieldname) }
187
192
  end
188
193
  end
189
194
  end
@@ -191,78 +196,105 @@ end
191
196
 
192
197
  options = []
193
198
 
194
- op = OptionParser.new{|o|
199
+ op = OptionParser.new do |o|
195
200
  o.separator "\nMain Options:"
196
- o.on('--level <amount>', Integer, 'strength (default 10)'){|amount|
197
- options << '--level' << amount }
198
- o.on('--never-resign', 'Forbid GNU Go to resign'){
199
- options << '--never-resign' }
200
- o.on('--resign-allowed', 'Allow resignation (default)'){
201
- options << '--resign-allowed' }
202
- o.on('-l', '--infile <file>', 'Load name sgf file'){|file|
203
- options << '--infile' << file }
204
- o.on('-L', '--until <move>', 'Stop loading just before move is played. <move>
205
- can be the move number or location (eg L10).'){|move|
206
- options << '--until' << move }
207
- o.on('-o', '--outfile <file>', 'Write sgf output to file'){|file|
208
- options << '--outfile' << file }
209
- o.on('--printsgf <file>', 'Write position as a diagram to file (use with -l)'){|file|
210
- options << '--printsgf' << file }
201
+ o.on('--level <amount>', Integer, 'strength (default 10)') do |amount|
202
+ options << '--level' << amount
203
+ end
204
+ o.on('--never-resign', 'Forbid GNU Go to resign') do
205
+ options << '--never-resign'
206
+ end
207
+ o.on('--resign-allowed', 'Allow resignation (default)') do
208
+ options << '--resign-allowed'
209
+ end
210
+ o.on('-l', '--infile <file>', 'Load name sgf file') do |file|
211
+ options << '--infile' << file
212
+ end
213
+ o.on('-L', '--until <move>', 'Stop loading just before move is played. <move>
214
+ can be the move number or location (eg L10).') do |move|
215
+ options << '--until' << move
216
+ end
217
+ o.on('-o', '--outfile <file>', 'Write sgf output to file') do |file|
218
+ options << '--outfile' << file
219
+ end
220
+ o.on('--printsgf <file>', 'Write position as a diagram to file (use with -l)') do |file|
221
+ options << '--printsgf' << file
222
+ end
211
223
 
212
224
  o.separator "\nGame Options:"
213
- o.on('--boardsize <num>', Integer, 'Set the board size to use (1--19)'){|num|
214
- options << '--boardsize' << num }
215
- o.on('--color <color>', "Choose your color ('black' or 'white')"){|color|
216
- options << '--color' << color }
217
- o.on('--handicap <num>', Integer, 'Set the number of handicap stones (0--9)'){|num|
218
- options << '--handicap' << num }
219
- o.on('--komi <num>', Integer, 'Set the komi'){|num|
220
- options << '--komi' << num }
221
- o.on('--clock <sec>', 'Initialize the timer.'){|sec|
222
- options << '--clock' << sec }
223
- o.on('--byo-time <sec>', 'Initialize the byo-yomi timer.'){|sec|
224
- options << '--byo-time' << sec }
225
- o.on('--byo-period <stones>', 'Initialize the byo-yomi period.'){|stones|
226
- options << '--byo-period' << stones }
227
-
228
- o.on('--japanese-rules', '(default)'){
229
- options << '---japanese-rules' }
230
- o.on('--chinese-rules'){
231
- options << '--chinese-rules' }
232
- o.on('--forbid-suicide', 'Forbid suicide. (default)'){
233
- options << '--forbid-suicide' }
234
- o.on('--allow-suicide', 'Allow suicide except single-stone suicide.'){
235
- options << '--allow-suicide' }
236
- o.on('--allow-all-suicide', 'Allow all suicide moves.'){
237
- options << '--allow-all-suicide' }
238
- o.on('--simple-ko', 'Forbid simple ko recapture. (default)'){
239
- options << '--simple-ko' }
240
- o.on('--no-ko', 'Allow any ko recapture.'){
241
- options << '--no-ko' }
242
- o.on('--positional-superko', 'Positional superko restrictions.'){
243
- options << '--positional-superko' }
244
- o.on('--situational-superko', 'Situational superko restrictions.'){
245
- options << '--situational-superko' }
246
-
247
- o.on('--play-out-aftermath'){
248
- options << '--play-out-aftermath' }
249
- o.on('--capture-all-dead'){
250
- options << '--capture-all-dead' }
251
-
252
- o.on('--min-level <amount>', 'minimum level for adjustment schemes'){|amount|
253
- options << '--min-level' << amount }
254
- o.on('--max-level <amount>', 'maximum level for adjustment schemes'){|amount|
255
- options << '--max-level' << amount }
256
- o.on('--autolevel', 'adapt gnugo level during game to respect
257
- the time specified by --clock <sec>.'){
258
- options << '--autolevel' }
225
+ o.on('--boardsize <num>', Integer, 'Set the board size to use (1--19)') do |num|
226
+ options << '--boardsize' << num
227
+ end
228
+ o.on('--color <color>', "Choose your color ('black' or 'white')") do |color|
229
+ options << '--color' << color
230
+ end
231
+ o.on('--handicap <num>', Integer, 'Set the number of handicap stones (0--9)') do |num|
232
+ options << '--handicap' << num
233
+ end
234
+ o.on('--komi <num>', Integer, 'Set the komi') do |num|
235
+ options << '--komi' << num
236
+ end
237
+ o.on('--clock <sec>', 'Initialize the timer.') do |sec|
238
+ options << '--clock' << sec
239
+ end
240
+ o.on('--byo-time <sec>', 'Initialize the byo-yomi timer.') do |sec|
241
+ options << '--byo-time' << sec
242
+ end
243
+ o.on('--byo-period <stones>', 'Initialize the byo-yomi period.') do |stones|
244
+ options << '--byo-period' << stones
245
+ end
259
246
 
247
+ o.on('--japanese-rules', '(default)') do
248
+ options << '---japanese-rules'
249
+ end
250
+ o.on('--chinese-rules') do
251
+ options << '--chinese-rules'
252
+ end
253
+ o.on('--forbid-suicide', 'Forbid suicide. (default)') do
254
+ options << '--forbid-suicide'
255
+ end
256
+ o.on('--allow-suicide', 'Allow suicide except single-stone suicide.') do
257
+ options << '--allow-suicide'
258
+ end
259
+ o.on('--allow-all-suicide', 'Allow all suicide moves.') do
260
+ options << '--allow-all-suicide'
261
+ end
262
+ o.on('--simple-ko', 'Forbid simple ko recapture. (default)') do
263
+ options << '--simple-ko'
264
+ end
265
+ o.on('--no-ko', 'Allow any ko recapture.') do
266
+ options << '--no-ko'
267
+ end
268
+ o.on('--positional-superko', 'Positional superko restrictions.') do
269
+ options << '--positional-superko'
270
+ end
271
+ o.on('--situational-superko', 'Situational superko restrictions.') do
272
+ options << '--situational-superko'
273
+ end
260
274
 
261
- o.on('-h', '--help'){
275
+ o.on('--play-out-aftermath') do
276
+ options << '--play-out-aftermath'
277
+ end
278
+ o.on('--capture-all-dead') do
279
+ options << '--capture-all-dead'
280
+ end
281
+
282
+ o.on('--min-level <amount>', 'minimum level for adjustment schemes') do |amount|
283
+ options << '--min-level' << amount
284
+ end
285
+ o.on('--max-level <amount>', 'maximum level for adjustment schemes') do |amount|
286
+ options << '--max-level' << amount
287
+ end
288
+ o.on('--autolevel', 'adapt gnugo level during game to respect
289
+ the time specified by --clock <sec>.') do
290
+ options << '--autolevel'
291
+ end
292
+
293
+ o.on('-h', '--help') do
262
294
  puts o
263
295
  exit
264
- }
265
- }
296
+ end
297
+ end
266
298
 
267
299
  op.parse!
268
300
 
@@ -1,18 +1,19 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require_relative '../lib/ffi-tk'
4
5
 
5
6
  Tk.init
6
7
 
7
- Tk.root.bind('Control-c'){|event| p event }
8
- Tk.root.bind('Control-q'){|event| exit }
8
+ Tk.root.bind('Control-c') { |event| p event }
9
+ Tk.root.bind('Control-q') { |_event| exit }
9
10
 
10
- hello = Tk::Button.new('.', text: 'Push me'){
11
- Tk::MessageBox.new(message: 'Hello, World!')
12
- }.pack
11
+ hello = Tk::Button.new('.', text: 'Push me') do
12
+ Tk.message_box(message: 'Hello, World!')
13
+ end.pack
13
14
 
14
15
  button = Tk::Button.new('.', text: 'Destroy me!').pack
15
- button.bind('Enter'){|event| button.destroy }
16
+ button.bind('Enter') { |_event| button.destroy }
16
17
 
17
18
  text = Tk::Text.new('.')
18
19
  text.insert 'insert', 'Hello, World!'
@@ -22,4 +23,4 @@ entry = Tk::Entry.new('.')
22
23
  entry.insert 'end', 'Hello, World!'
23
24
  entry.pack fill: :x
24
25
 
25
- Tk.mainloop
26
+ Tk.mainloop
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'ffi-tk'
2
3
 
3
4
  Tk.init
@@ -6,11 +7,11 @@ variable = Tk::Variable.new('showstopper', false)
6
7
  label = Tk::Label.new(Tk.root, text: 'enter anything to reflect it here').pack
7
8
 
8
9
  entry = Tk::Entry.new(Tk.root, textvariable: variable).pack
9
- button = Tk::Button.new(Tk.root, text: 'Exit'){ exit }.pack
10
+ button = Tk::Button.new(Tk.root, text: 'Exit') { exit }.pack
10
11
 
11
12
  loop do
12
13
  Tk::Wait.variable(variable)
13
14
  label.configure text: variable.to_s
14
15
  end
15
16
 
16
- Tk.mainloop
17
+ Tk.mainloop
@@ -1,33 +1,34 @@
1
1
  # -*- encoding: utf-8 -*-
2
+ # stub: ffi-tk 2018.02.20 ruby lib
2
3
 
3
4
  Gem::Specification.new do |s|
4
- s.name = %q{ffi-tk}
5
- s.version = "2010.08.23"
5
+ s.name = "ffi-tk".freeze
6
+ s.version = "2018.02.20"
6
7
 
7
- s.required_rubygems_version = Gem::Requirement.new(">= 1.3.3") if s.respond_to? :required_rubygems_version=
8
- s.authors = ["Michael 'manveru' Fellinger"]
9
- s.date = %q{2010-08-23}
10
- s.description = %q{Pure Ruby FFI wrapper for the Tk GUI toolkit.}
11
- s.email = %q{m.fellinger@gmail.com}
12
- s.files = [".gitignore", "AUTHORS", "CHANGELOG", "MANIFEST", "README.md", "Rakefile", "TODO.md", "bin/rwish", "doc/MIT_LICENSE", "doc/TCL_LICENSE", "example/choose_color.rb", "example/choose_directory.rb", "example/dialog.rb", "example/hello.rb", "example/message_box.rb", "example/option_menu.rb", "example/popup.rb", "example/set_palette.rb", "example/text.rb", "example/tile/kroc_demo_small.rb", "example/tile/kroc_rb_demo.rb", "example/tile/notebook.rb", "example/tile/theme_hello.rb", "example/tile/themes.rb", "example/tile/treeview.rb", "example/tkgo.rb", "example/various.rb", "example/wait.rb", "ffi-tk.gemspec", "lib/ffi-tk.rb", "lib/ffi-tk/command.rb", "lib/ffi-tk/command/after.rb", "lib/ffi-tk/command/bell.rb", "lib/ffi-tk/command/bind.rb", "lib/ffi-tk/command/bindtags.rb", "lib/ffi-tk/command/cget.rb", "lib/ffi-tk/command/choose_color.rb", "lib/ffi-tk/command/choose_directory.rb", "lib/ffi-tk/command/clipboard.rb", "lib/ffi-tk/command/configure.rb", "lib/ffi-tk/command/destroy.rb", "lib/ffi-tk/command/dialog.rb", "lib/ffi-tk/command/event.rb", "lib/ffi-tk/command/focus.rb", "lib/ffi-tk/command/font.rb", "lib/ffi-tk/command/get_open_file.rb", "lib/ffi-tk/command/get_save_file.rb", "lib/ffi-tk/command/grab.rb", "lib/ffi-tk/command/grid.rb", "lib/ffi-tk/command/image.rb", "lib/ffi-tk/command/lower.rb", "lib/ffi-tk/command/message_box.rb", "lib/ffi-tk/command/option_menu.rb", "lib/ffi-tk/command/pack.rb", "lib/ffi-tk/command/place.rb", "lib/ffi-tk/command/popup.rb", "lib/ffi-tk/command/raise.rb", "lib/ffi-tk/command/scrollable.rb", "lib/ffi-tk/command/selection.rb", "lib/ffi-tk/command/set_palette.rb", "lib/ffi-tk/command/tk_cmd.rb", "lib/ffi-tk/command/vars.rb", "lib/ffi-tk/command/wait.rb", "lib/ffi-tk/command/winfo.rb", "lib/ffi-tk/command/wm.rb", "lib/ffi-tk/core_extensions.rb", "lib/ffi-tk/event/data.rb", "lib/ffi-tk/event/handler.rb", "lib/ffi-tk/ffi/tcl.rb", "lib/ffi-tk/ffi/tcl/cmd_proc.rb", "lib/ffi-tk/ffi/tcl/eval_result.rb", "lib/ffi-tk/ffi/tcl/interp.rb", "lib/ffi-tk/ffi/tcl/obj.rb", "lib/ffi-tk/ffi/tcl/time.rb", "lib/ffi-tk/ffi/tk.rb", "lib/ffi-tk/geometry.rb", "lib/ffi-tk/thread_sender.rb", "lib/ffi-tk/tk.rb", "lib/ffi-tk/variable.rb", "lib/ffi-tk/version.rb", "lib/ffi-tk/widget.rb", "lib/ffi-tk/widget/button.rb", "lib/ffi-tk/widget/canvas.rb", "lib/ffi-tk/widget/canvas/arc.rb", "lib/ffi-tk/widget/canvas/bitmap.rb", "lib/ffi-tk/widget/canvas/image.rb", "lib/ffi-tk/widget/canvas/item.rb", "lib/ffi-tk/widget/canvas/line.rb", "lib/ffi-tk/widget/canvas/oval.rb", "lib/ffi-tk/widget/canvas/polygon.rb", "lib/ffi-tk/widget/canvas/rectangle.rb", "lib/ffi-tk/widget/canvas/text.rb", "lib/ffi-tk/widget/canvas/window.rb", "lib/ffi-tk/widget/checkbutton.rb", "lib/ffi-tk/widget/entry.rb", "lib/ffi-tk/widget/frame.rb", "lib/ffi-tk/widget/label.rb", "lib/ffi-tk/widget/labelframe.rb", "lib/ffi-tk/widget/listbox.rb", "lib/ffi-tk/widget/menu.rb", "lib/ffi-tk/widget/menubutton.rb", "lib/ffi-tk/widget/message.rb", "lib/ffi-tk/widget/panedwindow.rb", "lib/ffi-tk/widget/radiobutton.rb", "lib/ffi-tk/widget/root.rb", "lib/ffi-tk/widget/scale.rb", "lib/ffi-tk/widget/scrollbar.rb", "lib/ffi-tk/widget/spinbox.rb", "lib/ffi-tk/widget/text.rb", "lib/ffi-tk/widget/text/peer.rb", "lib/ffi-tk/widget/tile.rb", "lib/ffi-tk/widget/tile/button.rb", "lib/ffi-tk/widget/tile/checkbutton.rb", "lib/ffi-tk/widget/tile/combobox.rb", "lib/ffi-tk/widget/tile/entry.rb", "lib/ffi-tk/widget/tile/frame.rb", "lib/ffi-tk/widget/tile/label.rb", "lib/ffi-tk/widget/tile/labelframe.rb", "lib/ffi-tk/widget/tile/menubutton.rb", "lib/ffi-tk/widget/tile/notebook.rb", "lib/ffi-tk/widget/tile/panedwindow.rb", "lib/ffi-tk/widget/tile/progressbar.rb", "lib/ffi-tk/widget/tile/radiobutton.rb", "lib/ffi-tk/widget/tile/scale.rb", "lib/ffi-tk/widget/tile/scrollbar.rb", "lib/ffi-tk/widget/tile/separator.rb", "lib/ffi-tk/widget/tile/sizegrip.rb", "lib/ffi-tk/widget/tile/style.rb", "lib/ffi-tk/widget/tile/treeview.rb", "lib/ffi-tk/widget/toplevel.rb", "spec/ffi-tk/command/bind.rb", "spec/ffi-tk/command/bindtags.rb", "spec/ffi-tk/command/clipboard.rb", "spec/ffi-tk/command/font.rb", "spec/ffi-tk/command/grid.rb", "spec/ffi-tk/command/image.rb", "spec/ffi-tk/command/pack.rb", "spec/ffi-tk/command/place.rb", "spec/ffi-tk/command/selection.rb", "spec/ffi-tk/command/vars.rb", "spec/ffi-tk/command/winfo.rb", "spec/ffi-tk/command/wm.rb", "spec/ffi-tk/event.rb", "spec/ffi-tk/tile/button.rb", "spec/ffi-tk/tile/checkbutton.rb", "spec/ffi-tk/tile/combobox.rb", "spec/ffi-tk/tile/entry.rb", "spec/ffi-tk/tile/frame.rb", "spec/ffi-tk/tile/label.rb", "spec/ffi-tk/tile/labelframe.rb", "spec/ffi-tk/tile/menubutton.rb", "spec/ffi-tk/tile/notebook.rb", "spec/ffi-tk/tile/panedwindow.rb", "spec/ffi-tk/tile/progressbar.rb", "spec/ffi-tk/tile/radiobutton.rb", "spec/ffi-tk/tile/scale.rb", "spec/ffi-tk/tile/scrollbar.rb", "spec/ffi-tk/tile/separator.rb", "spec/ffi-tk/tile/sizegrip.rb", "spec/ffi-tk/tile/style.rb", "spec/ffi-tk/tile/treeview.rb", "spec/ffi-tk/variable.rb", "spec/ffi-tk/widget/button.rb", "spec/ffi-tk/widget/canvas.rb", "spec/ffi-tk/widget/checkbutton.rb", "spec/ffi-tk/widget/entry.rb", "spec/ffi-tk/widget/frame.rb", "spec/ffi-tk/widget/label.rb", "spec/ffi-tk/widget/labelframe.rb", "spec/ffi-tk/widget/listbox.rb", "spec/ffi-tk/widget/menu.rb", "spec/ffi-tk/widget/menubutton.rb", "spec/ffi-tk/widget/message.rb", "spec/ffi-tk/widget/panedwindow.rb", "spec/ffi-tk/widget/radiobutton.rb", "spec/ffi-tk/widget/root.rb", "spec/ffi-tk/widget/scale.rb", "spec/ffi-tk/widget/scrollbar.rb", "spec/ffi-tk/widget/spinbox.rb", "spec/ffi-tk/widget/text.rb", "spec/ffi-tk/widget/toplevel.rb", "spec/helper.rb", "tasks/authors.rake", "tasks/bacon.rake", "tasks/changelog.rake", "tasks/gem.rake", "tasks/gem_setup.rake", "tasks/grancher.rake", "tasks/manifest.rake", "tasks/rcov.rake", "tasks/release.rake", "tasks/reversion.rake", "tasks/setup.rake", "tasks/ycov.rake"]
13
- s.homepage = %q{http://github.com/manveru/ffi-tk}
14
- s.require_paths = ["lib"]
15
- s.rubygems_version = %q{1.3.7}
16
- s.summary = %q{Pure Ruby FFI wrapper for the Tk GUI toolkit.}
8
+ s.required_rubygems_version = Gem::Requirement.new(">= 1.3.3".freeze) if s.respond_to? :required_rubygems_version=
9
+ s.require_paths = ["lib".freeze]
10
+ s.authors = ["Michael 'manveru' Fellinger".freeze]
11
+ s.date = "2018-02-20"
12
+ s.description = "Comfortably talk with Tcl/Tk using FFI.".freeze
13
+ s.email = "m.fellinger@gmail.com".freeze
14
+ s.files = [".gitignore".freeze, ".rubocop.yml".freeze, ".rubocop_todo.yml".freeze, "AUTHORS".freeze, "CHANGELOG".freeze, "Gemfile".freeze, "Gemfile.lock".freeze, "MANIFEST".freeze, "README.md".freeze, "Rakefile".freeze, "TODO.md".freeze, "bin/rwish".freeze, "doc/MIT_LICENSE".freeze, "doc/TCL_LICENSE".freeze, "example/choose_color.rb".freeze, "example/choose_directory.rb".freeze, "example/dialog.rb".freeze, "example/hello.rb".freeze, "example/message_box.rb".freeze, "example/option_menu.rb".freeze, "example/popup.rb".freeze, "example/set_palette.rb".freeze, "example/text.rb".freeze, "example/tile/kroc_demo_small.rb".freeze, "example/tile/kroc_rb_demo.rb".freeze, "example/tile/notebook.rb".freeze, "example/tile/theme_hello.rb".freeze, "example/tile/themes.rb".freeze, "example/tile/treeview.rb".freeze, "example/tkgo.rb".freeze, "example/various.rb".freeze, "example/wait.rb".freeze, "ffi-tk.gemspec".freeze, "gemset.nix".freeze, "lib/ffi-tk.rb".freeze, "lib/ffi-tk/command.rb".freeze, "lib/ffi-tk/command/after.rb".freeze, "lib/ffi-tk/command/bell.rb".freeze, "lib/ffi-tk/command/bind.rb".freeze, "lib/ffi-tk/command/bindtags.rb".freeze, "lib/ffi-tk/command/cget.rb".freeze, "lib/ffi-tk/command/choose_color.rb".freeze, "lib/ffi-tk/command/choose_directory.rb".freeze, "lib/ffi-tk/command/clipboard.rb".freeze, "lib/ffi-tk/command/configure.rb".freeze, "lib/ffi-tk/command/destroy.rb".freeze, "lib/ffi-tk/command/dialog.rb".freeze, "lib/ffi-tk/command/event.rb".freeze, "lib/ffi-tk/command/focus.rb".freeze, "lib/ffi-tk/command/font.rb".freeze, "lib/ffi-tk/command/get_open_file.rb".freeze, "lib/ffi-tk/command/get_save_file.rb".freeze, "lib/ffi-tk/command/grab.rb".freeze, "lib/ffi-tk/command/grid.rb".freeze, "lib/ffi-tk/command/image.rb".freeze, "lib/ffi-tk/command/lower.rb".freeze, "lib/ffi-tk/command/message_box.rb".freeze, "lib/ffi-tk/command/option_menu.rb".freeze, "lib/ffi-tk/command/pack.rb".freeze, "lib/ffi-tk/command/place.rb".freeze, "lib/ffi-tk/command/popup.rb".freeze, "lib/ffi-tk/command/raise.rb".freeze, "lib/ffi-tk/command/scrollable.rb".freeze, "lib/ffi-tk/command/selection.rb".freeze, "lib/ffi-tk/command/set_palette.rb".freeze, "lib/ffi-tk/command/tk_cmd.rb".freeze, "lib/ffi-tk/command/vars.rb".freeze, "lib/ffi-tk/command/wait.rb".freeze, "lib/ffi-tk/command/winfo.rb".freeze, "lib/ffi-tk/command/wm.rb".freeze, "lib/ffi-tk/core_extensions.rb".freeze, "lib/ffi-tk/event/data.rb".freeze, "lib/ffi-tk/event/handler.rb".freeze, "lib/ffi-tk/ffi/tcl.rb".freeze, "lib/ffi-tk/ffi/tcl/cmd_proc.rb".freeze, "lib/ffi-tk/ffi/tcl/eval_result.rb".freeze, "lib/ffi-tk/ffi/tcl/interp.rb".freeze, "lib/ffi-tk/ffi/tcl/obj.rb".freeze, "lib/ffi-tk/ffi/tcl/time.rb".freeze, "lib/ffi-tk/ffi/tk.rb".freeze, "lib/ffi-tk/geometry.rb".freeze, "lib/ffi-tk/thread_sender.rb".freeze, "lib/ffi-tk/tk.rb".freeze, "lib/ffi-tk/variable.rb".freeze, "lib/ffi-tk/version.rb".freeze, "lib/ffi-tk/widget.rb".freeze, "lib/ffi-tk/widget/button.rb".freeze, "lib/ffi-tk/widget/canvas.rb".freeze, "lib/ffi-tk/widget/canvas/arc.rb".freeze, "lib/ffi-tk/widget/canvas/bitmap.rb".freeze, "lib/ffi-tk/widget/canvas/image.rb".freeze, "lib/ffi-tk/widget/canvas/item.rb".freeze, "lib/ffi-tk/widget/canvas/line.rb".freeze, "lib/ffi-tk/widget/canvas/oval.rb".freeze, "lib/ffi-tk/widget/canvas/polygon.rb".freeze, "lib/ffi-tk/widget/canvas/rectangle.rb".freeze, "lib/ffi-tk/widget/canvas/text.rb".freeze, "lib/ffi-tk/widget/canvas/window.rb".freeze, "lib/ffi-tk/widget/checkbutton.rb".freeze, "lib/ffi-tk/widget/entry.rb".freeze, "lib/ffi-tk/widget/frame.rb".freeze, "lib/ffi-tk/widget/label.rb".freeze, "lib/ffi-tk/widget/labelframe.rb".freeze, "lib/ffi-tk/widget/listbox.rb".freeze, "lib/ffi-tk/widget/menu.rb".freeze, "lib/ffi-tk/widget/menubutton.rb".freeze, "lib/ffi-tk/widget/message.rb".freeze, "lib/ffi-tk/widget/panedwindow.rb".freeze, "lib/ffi-tk/widget/radiobutton.rb".freeze, "lib/ffi-tk/widget/root.rb".freeze, "lib/ffi-tk/widget/scale.rb".freeze, "lib/ffi-tk/widget/scrollbar.rb".freeze, "lib/ffi-tk/widget/spinbox.rb".freeze, "lib/ffi-tk/widget/text.rb".freeze, "lib/ffi-tk/widget/text/peer.rb".freeze, "lib/ffi-tk/widget/tile.rb".freeze, "lib/ffi-tk/widget/tile/button.rb".freeze, "lib/ffi-tk/widget/tile/checkbutton.rb".freeze, "lib/ffi-tk/widget/tile/combobox.rb".freeze, "lib/ffi-tk/widget/tile/entry.rb".freeze, "lib/ffi-tk/widget/tile/frame.rb".freeze, "lib/ffi-tk/widget/tile/label.rb".freeze, "lib/ffi-tk/widget/tile/labelframe.rb".freeze, "lib/ffi-tk/widget/tile/menubutton.rb".freeze, "lib/ffi-tk/widget/tile/notebook.rb".freeze, "lib/ffi-tk/widget/tile/panedwindow.rb".freeze, "lib/ffi-tk/widget/tile/progressbar.rb".freeze, "lib/ffi-tk/widget/tile/radiobutton.rb".freeze, "lib/ffi-tk/widget/tile/scale.rb".freeze, "lib/ffi-tk/widget/tile/scrollbar.rb".freeze, "lib/ffi-tk/widget/tile/separator.rb".freeze, "lib/ffi-tk/widget/tile/sizegrip.rb".freeze, "lib/ffi-tk/widget/tile/style.rb".freeze, "lib/ffi-tk/widget/tile/treeview.rb".freeze, "lib/ffi-tk/widget/toplevel.rb".freeze, "shell.nix".freeze, "spec/ffi-tk/command/bind.rb".freeze, "spec/ffi-tk/command/bindtags.rb".freeze, "spec/ffi-tk/command/clipboard.rb".freeze, "spec/ffi-tk/command/font.rb".freeze, "spec/ffi-tk/command/image.rb".freeze, "spec/ffi-tk/command/pack.rb".freeze, "spec/ffi-tk/command/place.rb".freeze, "spec/ffi-tk/command/selection.rb".freeze, "spec/ffi-tk/command/vars.rb".freeze, "spec/ffi-tk/command/winfo.rb".freeze, "spec/ffi-tk/command/wm.rb".freeze, "spec/ffi-tk/event.rb".freeze, "spec/ffi-tk/tile/button.rb".freeze, "spec/ffi-tk/tile/checkbutton.rb".freeze, "spec/ffi-tk/tile/combobox.rb".freeze, "spec/ffi-tk/tile/entry.rb".freeze, "spec/ffi-tk/tile/frame.rb".freeze, "spec/ffi-tk/tile/label.rb".freeze, "spec/ffi-tk/tile/labelframe.rb".freeze, "spec/ffi-tk/tile/menubutton.rb".freeze, "spec/ffi-tk/tile/notebook.rb".freeze, "spec/ffi-tk/tile/panedwindow.rb".freeze, "spec/ffi-tk/tile/progressbar.rb".freeze, "spec/ffi-tk/tile/radiobutton.rb".freeze, "spec/ffi-tk/tile/scale.rb".freeze, "spec/ffi-tk/tile/scrollbar.rb".freeze, "spec/ffi-tk/tile/separator.rb".freeze, "spec/ffi-tk/tile/sizegrip.rb".freeze, "spec/ffi-tk/tile/style.rb".freeze, "spec/ffi-tk/tile/treeview.rb".freeze, "spec/ffi-tk/variable.rb".freeze, "spec/ffi-tk/widget/button.rb".freeze, "spec/ffi-tk/widget/canvas.rb".freeze, "spec/ffi-tk/widget/checkbutton.rb".freeze, "spec/ffi-tk/widget/entry.rb".freeze, "spec/ffi-tk/widget/frame.rb".freeze, "spec/ffi-tk/widget/label.rb".freeze, "spec/ffi-tk/widget/labelframe.rb".freeze, "spec/ffi-tk/widget/listbox.rb".freeze, "spec/ffi-tk/widget/menu.rb".freeze, "spec/ffi-tk/widget/menubutton.rb".freeze, "spec/ffi-tk/widget/message.rb".freeze, "spec/ffi-tk/widget/panedwindow.rb".freeze, "spec/ffi-tk/widget/radiobutton.rb".freeze, "spec/ffi-tk/widget/root.rb".freeze, "spec/ffi-tk/widget/scale.rb".freeze, "spec/ffi-tk/widget/scrollbar.rb".freeze, "spec/ffi-tk/widget/spinbox.rb".freeze, "spec/ffi-tk/widget/text.rb".freeze, "spec/ffi-tk/widget/toplevel.rb".freeze, "spec/helper.rb".freeze, "tasks/authors.rake".freeze, "tasks/bacon.rake".freeze, "tasks/changelog.rake".freeze, "tasks/gem.rake".freeze, "tasks/manifest.rake".freeze, "tasks/release.rake".freeze, "tasks/reversion.rake".freeze]
15
+ s.homepage = "http://github.com/manveru/ffi-tk".freeze
16
+ s.licenses = ["MIT".freeze]
17
+ s.rubygems_version = "2.6.13".freeze
18
+ s.summary = "Pure Ruby FFI wrapper for the Tk GUI toolkit.".freeze
17
19
 
18
20
  if s.respond_to? :specification_version then
19
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
20
- s.specification_version = 3
21
+ s.specification_version = 4
21
22
 
22
23
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
23
- s.add_runtime_dependency(%q<ffi>, ["= 0.6.3"])
24
- s.add_development_dependency(%q<bacon>, [">= 1.1.0"])
24
+ s.add_runtime_dependency(%q<ffi>.freeze, ["~> 1.9"])
25
+ s.add_development_dependency(%q<bacon>.freeze, ["~> 1.2"])
25
26
  else
26
- s.add_dependency(%q<ffi>, ["= 0.6.3"])
27
- s.add_dependency(%q<bacon>, [">= 1.1.0"])
27
+ s.add_dependency(%q<ffi>.freeze, ["~> 1.9"])
28
+ s.add_dependency(%q<bacon>.freeze, ["~> 1.2"])
28
29
  end
29
30
  else
30
- s.add_dependency(%q<ffi>, ["= 0.6.3"])
31
- s.add_dependency(%q<bacon>, [">= 1.1.0"])
31
+ s.add_dependency(%q<ffi>.freeze, ["~> 1.9"])
32
+ s.add_dependency(%q<bacon>.freeze, ["~> 1.2"])
32
33
  end
33
34
  end