ffi-tk 2010.02 → 2010.03

Sign up to get free protection for your applications and to get access to all the features.
data/AUTHORS CHANGED
@@ -1,5 +1,6 @@
1
1
  Following persons have contributed to ffi-tk.
2
2
  (Sorted by number of submitted patches, then alphabetically)
3
3
 
4
- 217 Michael Fellinger <m.fellinger@gmail.com>
5
- 18 Julian Langschaedel <meta.rb@gmail.com>
4
+ 225 Michael Fellinger <m.fellinger@gmail.com>
5
+ 19 Julian Langschaedel <meta.rb@gmail.com>
6
+ 1 unknown <manveru@.(none)>
data/CHANGELOG CHANGED
@@ -1,3 +1,43 @@
1
+ [920e7c5 | 2010-03-02 05:07:40 UTC] Michael Fellinger <m.fellinger@gmail.com>
2
+
3
+ * Version 2010.03
4
+
5
+ [d0db268 | 2010-03-02 05:07:23 UTC] Michael Fellinger <m.fellinger@gmail.com>
6
+
7
+ * Update Rakefile
8
+
9
+ [6704d90 | 2010-03-01 05:38:20 UTC] Julian Langschaedel <meta.rb@gmail.com>
10
+
11
+ * Fix ffi_lib loadpaths osx
12
+
13
+ [9a44790 | 2010-03-01 10:24:38 UTC] Michael Fellinger <m.fellinger@gmail.com>
14
+
15
+ * Add some constants for flags
16
+
17
+ [7c520c9 | 2010-02-28 21:56:12 UTC] unknown <manveru@.(none)>
18
+
19
+ * Fix ffi_lib for windows
20
+
21
+ [8ad1897 | 2010-02-28 06:47:48 UTC] Michael Fellinger <m.fellinger@gmail.com>
22
+
23
+ * Force output of clipboard to UTF-8
24
+
25
+ [fb959b5 | 2010-02-26 17:45:24 UTC] Michael Fellinger <m.fellinger@gmail.com>
26
+
27
+ * Text#get_displaychars should return String
28
+
29
+ [12d960a | 2010-02-25 15:19:05 UTC] Michael Fellinger <m.fellinger@gmail.com>
30
+
31
+ * Add shortcut for the tcl update command
32
+
33
+ [2de99ed | 2010-02-17 17:57:57 UTC] Michael Fellinger <m.fellinger@gmail.com>
34
+
35
+ * Make sure Text#tag_cget doesn't return EvalResult
36
+
37
+ [a173b8a | 2010-02-15 06:37:09 UTC] Michael Fellinger <m.fellinger@gmail.com>
38
+
39
+ * Adapt to FFI 0.6
40
+
1
41
  [e1ae1ee | 2010-02-14 18:34:03 UTC] Michael Fellinger <m.fellinger@gmail.com>
2
42
 
3
43
  * Version 2010.02
data/Rakefile CHANGED
@@ -7,10 +7,10 @@ require 'date'
7
7
  PROJECT_SPECS = FileList['spec/ffi-tk/**/*.rb']
8
8
  PROJECT_MODULE = 'FFI::Tk'
9
9
  PROJECT_README = 'README.md'
10
- PROJECT_VERSION = ENV['VERSION'] || Date.today.strftime('%Y.%m.%d')
10
+ PROJECT_VERSION = (ENV['VERSION'] || Date.today.strftime('%Y.%m.%d')).dup
11
11
 
12
12
  DEPENDENCIES = {
13
- 'ffi' => {:version => '~> 0.5.4'},
13
+ 'ffi' => {:version => '= 0.6.2'},
14
14
  }
15
15
 
16
16
  DEVELOPMENT_DEPENDENCIES = {
@@ -29,7 +29,7 @@ GEMSPEC = Gem::Specification.new{|s|
29
29
  s.files = `git ls-files`.split("\n").sort
30
30
  s.has_rdoc = true
31
31
  s.require_path = 'lib'
32
- s.required_rubygems_version = '>= 1.3.5'
32
+ s.required_rubygems_version = '>= 1.3.3'
33
33
  }
34
34
 
35
35
  DEPENDENCIES.each do |name, options|
data/ffi-tk.gemspec CHANGED
@@ -2,17 +2,17 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{ffi-tk}
5
- s.version = "2010.02"
5
+ s.version = "2010.03"
6
6
 
7
- s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5") if s.respond_to? :required_rubygems_version=
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 1.3.3") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Michael 'manveru' Fellinger"]
9
- s.date = %q{2010-02-15}
9
+ s.date = %q{2010-03-02}
10
10
  s.description = %q{Pure Ruby FFI wrapper for the Tk GUI toolkit.}
11
11
  s.email = %q{m.fellinger@gmail.com}
12
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
13
  s.homepage = %q{http://github.com/manveru/ffi-tk}
14
14
  s.require_paths = ["lib"]
15
- s.rubygems_version = %q{1.3.5}
15
+ s.rubygems_version = %q{1.3.6}
16
16
  s.summary = %q{Pure Ruby FFI wrapper for the Tk GUI toolkit.}
17
17
 
18
18
  if s.respond_to? :specification_version then
@@ -20,14 +20,14 @@ Gem::Specification.new do |s|
20
20
  s.specification_version = 3
21
21
 
22
22
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
23
- s.add_runtime_dependency(%q<ffi>, ["~> 0.5.4"])
23
+ s.add_runtime_dependency(%q<ffi>, ["= 0.6.2"])
24
24
  s.add_development_dependency(%q<bacon>, [">= 1.1.0"])
25
25
  else
26
- s.add_dependency(%q<ffi>, ["~> 0.5.4"])
26
+ s.add_dependency(%q<ffi>, ["= 0.6.2"])
27
27
  s.add_dependency(%q<bacon>, [">= 1.1.0"])
28
28
  end
29
29
  else
30
- s.add_dependency(%q<ffi>, ["~> 0.5.4"])
30
+ s.add_dependency(%q<ffi>, ["= 0.6.2"])
31
31
  s.add_dependency(%q<bacon>, [">= 1.1.0"])
32
32
  end
33
33
  end
@@ -101,7 +101,9 @@ module Tk
101
101
  options[:displayof] = window unless None == window
102
102
  options[:type] = type.to_s.upcase unless None == type
103
103
 
104
- Tk.execute(:clipboard, :get, options.to_tcl_options).to_s
104
+ content = Tk.execute(:clipboard, :get, options.to_tcl_options).to_s
105
+ content.force_encoding('UTF-8')
106
+ content
105
107
  end
106
108
  end
107
109
  end
@@ -7,7 +7,7 @@ require 'ffi-tk/ffi/tcl/eval_result'
7
7
  module FFI
8
8
  module Tcl
9
9
  extend FFI::Library
10
- ffi_lib 'libtcl8.5.so', 'tcl85.dll', *::Tk::LIBPATH[:tcl]
10
+ ffi_lib [*::Tk::LIBPATH[:tcl], 'libtcl', 'tcl85', 'libtcl8.5']
11
11
 
12
12
  attach_function :Tcl_AppendAllObjTypes, [Interp, Obj], :int
13
13
  attach_function :Tcl_CreateInterp, [], Interp
data/lib/ffi-tk/ffi/tk.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module FFI
2
2
  module Tk
3
3
  extend FFI::Library
4
- ffi_lib 'libtk8.5.so', 'libtk.so', *::Tk::LIBPATH[:tk]
4
+ ffi_lib [*::Tk::LIBPATH[:tk], 'libtk', 'tk85', 'libtk8.5']
5
5
 
6
6
  class XColor < FFI::Struct
7
7
  layout(
data/lib/ffi-tk/tk.rb CHANGED
@@ -23,6 +23,13 @@ module Tk
23
23
  RUN_EVENTLOOP_ON_MAIN_THREAD = false
24
24
  end
25
25
 
26
+ DONT_WAIT = 1 << 1
27
+ WINDOW_EVENTS = 1 << 2
28
+ FILE_EVENTS = 1 << 3
29
+ TIMER_EVENTS = 1 << 4
30
+ IDLE_EVENTS = 1 << 5
31
+ ALL_EVENTS = ~DONT_WAIT
32
+
26
33
  def init
27
34
  if RUN_EVENTLOOP_ON_MAIN_THREAD
28
35
  @interp = FFI::Tcl.setup_eventloop_on_main_thread
@@ -91,6 +98,10 @@ module Tk
91
98
  execute('exit')
92
99
  end
93
100
 
101
+ def update(idletasks = None)
102
+ execute('update', idletasks)
103
+ end
104
+
94
105
  def callback_break
95
106
  throw :callback_break
96
107
  end
@@ -1,3 +1,3 @@
1
1
  module FFI::Tk
2
- VERSION = "2010.02"
2
+ VERSION = "2010.03"
3
3
  end
@@ -291,7 +291,7 @@ module Tk
291
291
  # This may have the effect that some of the returned ranges are empty
292
292
  # strings.
293
293
  def get_displaychars(index, *indices)
294
- execute('get', '-displaychars', index, *indices)
294
+ execute('get', '-displaychars', index, *indices).to_s
295
295
  end
296
296
 
297
297
  def image_cget(index, option)
@@ -728,7 +728,8 @@ module Tk
728
728
  # Option may have any of the values accepted by the pathName tag
729
729
  # configure widget command.
730
730
  def tag_cget(tag_name, option)
731
- execute(:tag, :cget, tag_name, option.to_tcl_option)
731
+ value = execute(:tag, :cget, tag_name, option.to_tcl_option)
732
+ Cget.option_to_ruby(option, value)
732
733
  end
733
734
 
734
735
  # This command is similar to the pathName configure widget command except
metadata CHANGED
@@ -1,7 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi-tk
3
3
  version: !ruby/object:Gem::Version
4
- version: "2010.02"
4
+ prerelease: false
5
+ segments:
6
+ - 2010
7
+ - 3
8
+ version: "2010.03"
5
9
  platform: ruby
6
10
  authors:
7
11
  - Michael 'manveru' Fellinger
@@ -9,29 +13,37 @@ autorequire:
9
13
  bindir: bin
10
14
  cert_chain: []
11
15
 
12
- date: 2010-02-15 00:00:00 +09:00
16
+ date: 2010-03-02 00:00:00 +09:00
13
17
  default_executable:
14
18
  dependencies:
15
19
  - !ruby/object:Gem::Dependency
16
20
  name: ffi
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
21
+ prerelease: false
22
+ requirement: &id001 !ruby/object:Gem::Requirement
20
23
  requirements:
21
- - - ~>
24
+ - - "="
22
25
  - !ruby/object:Gem::Version
23
- version: 0.5.4
24
- version:
26
+ segments:
27
+ - 0
28
+ - 6
29
+ - 2
30
+ version: 0.6.2
31
+ type: :runtime
32
+ version_requirements: *id001
25
33
  - !ruby/object:Gem::Dependency
26
34
  name: bacon
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
35
+ prerelease: false
36
+ requirement: &id002 !ruby/object:Gem::Requirement
30
37
  requirements:
31
38
  - - ">="
32
39
  - !ruby/object:Gem::Version
40
+ segments:
41
+ - 1
42
+ - 1
43
+ - 0
33
44
  version: 1.1.0
34
- version:
45
+ type: :development
46
+ version_requirements: *id002
35
47
  description: Pure Ruby FFI wrapper for the Tk GUI toolkit.
36
48
  email: m.fellinger@gmail.com
37
49
  executables: []
@@ -248,18 +260,22 @@ required_ruby_version: !ruby/object:Gem::Requirement
248
260
  requirements:
249
261
  - - ">="
250
262
  - !ruby/object:Gem::Version
263
+ segments:
264
+ - 0
251
265
  version: "0"
252
- version:
253
266
  required_rubygems_version: !ruby/object:Gem::Requirement
254
267
  requirements:
255
268
  - - ">="
256
269
  - !ruby/object:Gem::Version
257
- version: 1.3.5
258
- version:
270
+ segments:
271
+ - 1
272
+ - 3
273
+ - 3
274
+ version: 1.3.3
259
275
  requirements: []
260
276
 
261
277
  rubyforge_project:
262
- rubygems_version: 1.3.5
278
+ rubygems_version: 1.3.6
263
279
  signing_key:
264
280
  specification_version: 3
265
281
  summary: Pure Ruby FFI wrapper for the Tk GUI toolkit.