ffi-tk 2009.11.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +748 -0
- data/MANIFEST +188 -0
- data/README.md +85 -0
- data/Rakefile +47 -0
- data/TODO.md +62 -0
- data/bin/rwish +33 -0
- data/doc/MIT_LICENSE +18 -0
- data/doc/TCL_LICENSE +39 -0
- data/example/choose_color.rb +22 -0
- data/example/choose_directory.rb +22 -0
- data/example/dialog.rb +37 -0
- data/example/hello.rb +11 -0
- data/example/message_box.rb +26 -0
- data/example/option_menu.rb +17 -0
- data/example/popup.rb +24 -0
- data/example/set_palette.rb +32 -0
- data/example/text.rb +47 -0
- data/example/tile/kroc_demo_small.rb +123 -0
- data/example/tile/kroc_rb_demo.rb +135 -0
- data/example/tile/notebook.rb +48 -0
- data/example/tile/theme_hello.rb +38 -0
- data/example/tile/treeview.rb +71 -0
- data/example/various.rb +25 -0
- data/example/wait.rb +16 -0
- data/ffi-tk.gemspec +33 -0
- data/lib/ffi-tk.rb +76 -0
- data/lib/ffi-tk/command.rb +39 -0
- data/lib/ffi-tk/command/after.rb +36 -0
- data/lib/ffi-tk/command/bell.rb +34 -0
- data/lib/ffi-tk/command/bind.rb +11 -0
- data/lib/ffi-tk/command/bindtags.rb +69 -0
- data/lib/ffi-tk/command/cget.rb +92 -0
- data/lib/ffi-tk/command/choose_color.rb +29 -0
- data/lib/ffi-tk/command/choose_directory.rb +45 -0
- data/lib/ffi-tk/command/clipboard.rb +102 -0
- data/lib/ffi-tk/command/configure.rb +88 -0
- data/lib/ffi-tk/command/destroy.rb +12 -0
- data/lib/ffi-tk/command/dialog.rb +54 -0
- data/lib/ffi-tk/command/event.rb +79 -0
- data/lib/ffi-tk/command/focus.rb +70 -0
- data/lib/ffi-tk/command/font.rb +124 -0
- data/lib/ffi-tk/command/get_open_file.rb +85 -0
- data/lib/ffi-tk/command/get_save_file.rb +83 -0
- data/lib/ffi-tk/command/grab.rb +141 -0
- data/lib/ffi-tk/command/grid.rb +246 -0
- data/lib/ffi-tk/command/image.rb +79 -0
- data/lib/ffi-tk/command/lower.rb +23 -0
- data/lib/ffi-tk/command/message_box.rb +65 -0
- data/lib/ffi-tk/command/option_menu.rb +8 -0
- data/lib/ffi-tk/command/pack.rb +99 -0
- data/lib/ffi-tk/command/place.rb +91 -0
- data/lib/ffi-tk/command/popup.rb +14 -0
- data/lib/ffi-tk/command/raise.rb +25 -0
- data/lib/ffi-tk/command/scrollable.rb +151 -0
- data/lib/ffi-tk/command/selection.rb +132 -0
- data/lib/ffi-tk/command/set_palette.rb +9 -0
- data/lib/ffi-tk/command/tk_cmd.rb +155 -0
- data/lib/ffi-tk/command/vars.rb +82 -0
- data/lib/ffi-tk/command/wait.rb +39 -0
- data/lib/ffi-tk/command/winfo.rb +668 -0
- data/lib/ffi-tk/command/wm.rb +1025 -0
- data/lib/ffi-tk/core_extensions.rb +154 -0
- data/lib/ffi-tk/event/data.rb +60 -0
- data/lib/ffi-tk/event/handler.rb +44 -0
- data/lib/ffi-tk/ffi/tcl.rb +92 -0
- data/lib/ffi-tk/ffi/tcl/cmd_proc.rb +10 -0
- data/lib/ffi-tk/ffi/tcl/eval_result.rb +148 -0
- data/lib/ffi-tk/ffi/tcl/interp.rb +95 -0
- data/lib/ffi-tk/ffi/tcl/obj.rb +89 -0
- data/lib/ffi-tk/ffi/tcl/time.rb +36 -0
- data/lib/ffi-tk/ffi/tk.rb +35 -0
- data/lib/ffi-tk/geometry.rb +32 -0
- data/lib/ffi-tk/thread_sender.rb +26 -0
- data/lib/ffi-tk/tk.rb +222 -0
- data/lib/ffi-tk/variable.rb +46 -0
- data/lib/ffi-tk/widget.rb +68 -0
- data/lib/ffi-tk/widget/button.rb +41 -0
- data/lib/ffi-tk/widget/canvas.rb +806 -0
- data/lib/ffi-tk/widget/canvas/arc.rb +18 -0
- data/lib/ffi-tk/widget/canvas/bitmap.rb +13 -0
- data/lib/ffi-tk/widget/canvas/image.rb +10 -0
- data/lib/ffi-tk/widget/canvas/item.rb +170 -0
- data/lib/ffi-tk/widget/canvas/line.rb +16 -0
- data/lib/ffi-tk/widget/canvas/oval.rb +15 -0
- data/lib/ffi-tk/widget/canvas/polygon.rb +16 -0
- data/lib/ffi-tk/widget/canvas/rectangle.rb +15 -0
- data/lib/ffi-tk/widget/canvas/text.rb +15 -0
- data/lib/ffi-tk/widget/canvas/window.rb +11 -0
- data/lib/ffi-tk/widget/checkbutton.rb +63 -0
- data/lib/ffi-tk/widget/entry.rb +208 -0
- data/lib/ffi-tk/widget/frame.rb +12 -0
- data/lib/ffi-tk/widget/label.rb +26 -0
- data/lib/ffi-tk/widget/labelframe.rb +7 -0
- data/lib/ffi-tk/widget/listbox.rb +192 -0
- data/lib/ffi-tk/widget/menu.rb +318 -0
- data/lib/ffi-tk/widget/menubutton.rb +7 -0
- data/lib/ffi-tk/widget/message.rb +36 -0
- data/lib/ffi-tk/widget/panedwindow.rb +164 -0
- data/lib/ffi-tk/widget/radiobutton.rb +43 -0
- data/lib/ffi-tk/widget/root.rb +8 -0
- data/lib/ffi-tk/widget/scale.rb +44 -0
- data/lib/ffi-tk/widget/scrollbar.rb +114 -0
- data/lib/ffi-tk/widget/spinbox.rb +198 -0
- data/lib/ffi-tk/widget/text.rb +893 -0
- data/lib/ffi-tk/widget/text/peer.rb +10 -0
- data/lib/ffi-tk/widget/tile.rb +70 -0
- data/lib/ffi-tk/widget/tile/button.rb +8 -0
- data/lib/ffi-tk/widget/tile/checkbutton.rb +8 -0
- data/lib/ffi-tk/widget/tile/combobox.rb +43 -0
- data/lib/ffi-tk/widget/tile/entry.rb +8 -0
- data/lib/ffi-tk/widget/tile/frame.rb +13 -0
- data/lib/ffi-tk/widget/tile/label.rb +9 -0
- data/lib/ffi-tk/widget/tile/labelframe.rb +8 -0
- data/lib/ffi-tk/widget/tile/menubutton.rb +8 -0
- data/lib/ffi-tk/widget/tile/notebook.rb +93 -0
- data/lib/ffi-tk/widget/tile/panedwindow.rb +9 -0
- data/lib/ffi-tk/widget/tile/progressbar.rb +59 -0
- data/lib/ffi-tk/widget/tile/radiobutton.rb +8 -0
- data/lib/ffi-tk/widget/tile/scale.rb +8 -0
- data/lib/ffi-tk/widget/tile/scrollbar.rb +41 -0
- data/lib/ffi-tk/widget/tile/separator.rb +23 -0
- data/lib/ffi-tk/widget/tile/sizegrip.rb +24 -0
- data/lib/ffi-tk/widget/tile/style.rb +114 -0
- data/lib/ffi-tk/widget/tile/treeview.rb +414 -0
- data/lib/ffi-tk/widget/toplevel.rb +14 -0
- data/spec/ffi-tk/command/bindtags.rb +18 -0
- data/spec/ffi-tk/command/clipboard.rb +18 -0
- data/spec/ffi-tk/command/font.rb +67 -0
- data/spec/ffi-tk/command/grid.rb +6 -0
- data/spec/ffi-tk/command/image.rb +26 -0
- data/spec/ffi-tk/command/pack.rb +20 -0
- data/spec/ffi-tk/command/place.rb +20 -0
- data/spec/ffi-tk/command/selection.rb +13 -0
- data/spec/ffi-tk/command/vars.rb +32 -0
- data/spec/ffi-tk/command/winfo.rb +233 -0
- data/spec/ffi-tk/command/wm.rb +185 -0
- data/spec/ffi-tk/event.rb +95 -0
- data/spec/ffi-tk/tile/button.rb +51 -0
- data/spec/ffi-tk/tile/checkbutton.rb +13 -0
- data/spec/ffi-tk/tile/combobox.rb +65 -0
- data/spec/ffi-tk/tile/entry.rb +61 -0
- data/spec/ffi-tk/tile/frame.rb +65 -0
- data/spec/ffi-tk/tile/label.rb +17 -0
- data/spec/ffi-tk/tile/labelframe.rb +13 -0
- data/spec/ffi-tk/tile/menubutton.rb +13 -0
- data/spec/ffi-tk/tile/notebook.rb +103 -0
- data/spec/ffi-tk/tile/panedwindow.rb +13 -0
- data/spec/ffi-tk/tile/progressbar.rb +78 -0
- data/spec/ffi-tk/tile/radiobutton.rb +13 -0
- data/spec/ffi-tk/tile/scale.rb +13 -0
- data/spec/ffi-tk/tile/scrollbar.rb +43 -0
- data/spec/ffi-tk/tile/separator.rb +22 -0
- data/spec/ffi-tk/tile/sizegrip.rb +13 -0
- data/spec/ffi-tk/tile/style.rb +161 -0
- data/spec/ffi-tk/tile/treeview.rb +101 -0
- data/spec/ffi-tk/variable.rb +24 -0
- data/spec/ffi-tk/widget/button.rb +22 -0
- data/spec/ffi-tk/widget/canvas.rb +169 -0
- data/spec/ffi-tk/widget/checkbutton.rb +44 -0
- data/spec/ffi-tk/widget/entry.rb +155 -0
- data/spec/ffi-tk/widget/frame.rb +8 -0
- data/spec/ffi-tk/widget/label.rb +16 -0
- data/spec/ffi-tk/widget/labelframe.rb +12 -0
- data/spec/ffi-tk/widget/listbox.rb +19 -0
- data/spec/ffi-tk/widget/menu.rb +12 -0
- data/spec/ffi-tk/widget/menubutton.rb +12 -0
- data/spec/ffi-tk/widget/message.rb +12 -0
- data/spec/ffi-tk/widget/panedwindow.rb +12 -0
- data/spec/ffi-tk/widget/radiobutton.rb +12 -0
- data/spec/ffi-tk/widget/root.rb +9 -0
- data/spec/ffi-tk/widget/scale.rb +12 -0
- data/spec/ffi-tk/widget/scrollbar.rb +12 -0
- data/spec/ffi-tk/widget/spinbox.rb +12 -0
- data/spec/ffi-tk/widget/text.rb +246 -0
- data/spec/ffi-tk/widget/toplevel.rb +12 -0
- data/spec/helper.rb +3 -0
- data/tasks/authors.rake +21 -0
- data/tasks/bacon.rake +66 -0
- data/tasks/changelog.rake +18 -0
- data/tasks/gem.rake +22 -0
- data/tasks/gem_setup.rake +113 -0
- data/tasks/grancher.rake +12 -0
- data/tasks/manifest.rake +4 -0
- data/tasks/rcov.rake +17 -0
- data/tasks/release.rake +65 -0
- data/tasks/reversion.rake +8 -0
- data/tasks/setup.rake +12 -0
- data/tasks/ycov.rake +84 -0
- metadata +261 -0
data/MANIFEST
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
CHANGELOG
|
|
2
|
+
MANIFEST
|
|
3
|
+
README.md
|
|
4
|
+
Rakefile
|
|
5
|
+
TODO.md
|
|
6
|
+
bin/rwish
|
|
7
|
+
doc/MIT_LICENSE
|
|
8
|
+
doc/TCL_LICENSE
|
|
9
|
+
example/choose_color.rb
|
|
10
|
+
example/choose_directory.rb
|
|
11
|
+
example/dialog.rb
|
|
12
|
+
example/hello.rb
|
|
13
|
+
example/message_box.rb
|
|
14
|
+
example/option_menu.rb
|
|
15
|
+
example/popup.rb
|
|
16
|
+
example/set_palette.rb
|
|
17
|
+
example/text.rb
|
|
18
|
+
example/tile/kroc_demo_small.rb
|
|
19
|
+
example/tile/kroc_rb_demo.rb
|
|
20
|
+
example/tile/notebook.rb
|
|
21
|
+
example/tile/theme_hello.rb
|
|
22
|
+
example/tile/treeview.rb
|
|
23
|
+
example/various.rb
|
|
24
|
+
example/wait.rb
|
|
25
|
+
ffi-tk.gemspec
|
|
26
|
+
lib/ffi-tk.rb
|
|
27
|
+
lib/ffi-tk/command.rb
|
|
28
|
+
lib/ffi-tk/command/after.rb
|
|
29
|
+
lib/ffi-tk/command/bell.rb
|
|
30
|
+
lib/ffi-tk/command/bind.rb
|
|
31
|
+
lib/ffi-tk/command/bindtags.rb
|
|
32
|
+
lib/ffi-tk/command/cget.rb
|
|
33
|
+
lib/ffi-tk/command/choose_color.rb
|
|
34
|
+
lib/ffi-tk/command/choose_directory.rb
|
|
35
|
+
lib/ffi-tk/command/clipboard.rb
|
|
36
|
+
lib/ffi-tk/command/configure.rb
|
|
37
|
+
lib/ffi-tk/command/destroy.rb
|
|
38
|
+
lib/ffi-tk/command/dialog.rb
|
|
39
|
+
lib/ffi-tk/command/event.rb
|
|
40
|
+
lib/ffi-tk/command/focus.rb
|
|
41
|
+
lib/ffi-tk/command/font.rb
|
|
42
|
+
lib/ffi-tk/command/get_open_file.rb
|
|
43
|
+
lib/ffi-tk/command/get_save_file.rb
|
|
44
|
+
lib/ffi-tk/command/grab.rb
|
|
45
|
+
lib/ffi-tk/command/grid.rb
|
|
46
|
+
lib/ffi-tk/command/image.rb
|
|
47
|
+
lib/ffi-tk/command/lower.rb
|
|
48
|
+
lib/ffi-tk/command/message_box.rb
|
|
49
|
+
lib/ffi-tk/command/option_menu.rb
|
|
50
|
+
lib/ffi-tk/command/pack.rb
|
|
51
|
+
lib/ffi-tk/command/place.rb
|
|
52
|
+
lib/ffi-tk/command/popup.rb
|
|
53
|
+
lib/ffi-tk/command/raise.rb
|
|
54
|
+
lib/ffi-tk/command/scrollable.rb
|
|
55
|
+
lib/ffi-tk/command/selection.rb
|
|
56
|
+
lib/ffi-tk/command/set_palette.rb
|
|
57
|
+
lib/ffi-tk/command/tk_cmd.rb
|
|
58
|
+
lib/ffi-tk/command/vars.rb
|
|
59
|
+
lib/ffi-tk/command/wait.rb
|
|
60
|
+
lib/ffi-tk/command/winfo.rb
|
|
61
|
+
lib/ffi-tk/command/wm.rb
|
|
62
|
+
lib/ffi-tk/core_extensions.rb
|
|
63
|
+
lib/ffi-tk/event/data.rb
|
|
64
|
+
lib/ffi-tk/event/handler.rb
|
|
65
|
+
lib/ffi-tk/ffi/tcl.rb
|
|
66
|
+
lib/ffi-tk/ffi/tcl/cmd_proc.rb
|
|
67
|
+
lib/ffi-tk/ffi/tcl/eval_result.rb
|
|
68
|
+
lib/ffi-tk/ffi/tcl/interp.rb
|
|
69
|
+
lib/ffi-tk/ffi/tcl/obj.rb
|
|
70
|
+
lib/ffi-tk/ffi/tcl/time.rb
|
|
71
|
+
lib/ffi-tk/ffi/tk.rb
|
|
72
|
+
lib/ffi-tk/geometry.rb
|
|
73
|
+
lib/ffi-tk/thread_sender.rb
|
|
74
|
+
lib/ffi-tk/tk.rb
|
|
75
|
+
lib/ffi-tk/variable.rb
|
|
76
|
+
lib/ffi-tk/widget.rb
|
|
77
|
+
lib/ffi-tk/widget/button.rb
|
|
78
|
+
lib/ffi-tk/widget/canvas.rb
|
|
79
|
+
lib/ffi-tk/widget/canvas/arc.rb
|
|
80
|
+
lib/ffi-tk/widget/canvas/bitmap.rb
|
|
81
|
+
lib/ffi-tk/widget/canvas/image.rb
|
|
82
|
+
lib/ffi-tk/widget/canvas/item.rb
|
|
83
|
+
lib/ffi-tk/widget/canvas/line.rb
|
|
84
|
+
lib/ffi-tk/widget/canvas/oval.rb
|
|
85
|
+
lib/ffi-tk/widget/canvas/polygon.rb
|
|
86
|
+
lib/ffi-tk/widget/canvas/rectangle.rb
|
|
87
|
+
lib/ffi-tk/widget/canvas/text.rb
|
|
88
|
+
lib/ffi-tk/widget/canvas/window.rb
|
|
89
|
+
lib/ffi-tk/widget/checkbutton.rb
|
|
90
|
+
lib/ffi-tk/widget/entry.rb
|
|
91
|
+
lib/ffi-tk/widget/frame.rb
|
|
92
|
+
lib/ffi-tk/widget/label.rb
|
|
93
|
+
lib/ffi-tk/widget/labelframe.rb
|
|
94
|
+
lib/ffi-tk/widget/listbox.rb
|
|
95
|
+
lib/ffi-tk/widget/menu.rb
|
|
96
|
+
lib/ffi-tk/widget/menubutton.rb
|
|
97
|
+
lib/ffi-tk/widget/message.rb
|
|
98
|
+
lib/ffi-tk/widget/panedwindow.rb
|
|
99
|
+
lib/ffi-tk/widget/radiobutton.rb
|
|
100
|
+
lib/ffi-tk/widget/root.rb
|
|
101
|
+
lib/ffi-tk/widget/scale.rb
|
|
102
|
+
lib/ffi-tk/widget/scrollbar.rb
|
|
103
|
+
lib/ffi-tk/widget/spinbox.rb
|
|
104
|
+
lib/ffi-tk/widget/text.rb
|
|
105
|
+
lib/ffi-tk/widget/text/peer.rb
|
|
106
|
+
lib/ffi-tk/widget/tile.rb
|
|
107
|
+
lib/ffi-tk/widget/tile/button.rb
|
|
108
|
+
lib/ffi-tk/widget/tile/checkbutton.rb
|
|
109
|
+
lib/ffi-tk/widget/tile/combobox.rb
|
|
110
|
+
lib/ffi-tk/widget/tile/entry.rb
|
|
111
|
+
lib/ffi-tk/widget/tile/frame.rb
|
|
112
|
+
lib/ffi-tk/widget/tile/label.rb
|
|
113
|
+
lib/ffi-tk/widget/tile/labelframe.rb
|
|
114
|
+
lib/ffi-tk/widget/tile/menubutton.rb
|
|
115
|
+
lib/ffi-tk/widget/tile/notebook.rb
|
|
116
|
+
lib/ffi-tk/widget/tile/panedwindow.rb
|
|
117
|
+
lib/ffi-tk/widget/tile/progressbar.rb
|
|
118
|
+
lib/ffi-tk/widget/tile/radiobutton.rb
|
|
119
|
+
lib/ffi-tk/widget/tile/scale.rb
|
|
120
|
+
lib/ffi-tk/widget/tile/scrollbar.rb
|
|
121
|
+
lib/ffi-tk/widget/tile/separator.rb
|
|
122
|
+
lib/ffi-tk/widget/tile/sizegrip.rb
|
|
123
|
+
lib/ffi-tk/widget/tile/style.rb
|
|
124
|
+
lib/ffi-tk/widget/tile/treeview.rb
|
|
125
|
+
lib/ffi-tk/widget/toplevel.rb
|
|
126
|
+
spec/ffi-tk/command/bindtags.rb
|
|
127
|
+
spec/ffi-tk/command/clipboard.rb
|
|
128
|
+
spec/ffi-tk/command/font.rb
|
|
129
|
+
spec/ffi-tk/command/grid.rb
|
|
130
|
+
spec/ffi-tk/command/image.rb
|
|
131
|
+
spec/ffi-tk/command/pack.rb
|
|
132
|
+
spec/ffi-tk/command/place.rb
|
|
133
|
+
spec/ffi-tk/command/selection.rb
|
|
134
|
+
spec/ffi-tk/command/vars.rb
|
|
135
|
+
spec/ffi-tk/command/winfo.rb
|
|
136
|
+
spec/ffi-tk/command/wm.rb
|
|
137
|
+
spec/ffi-tk/event.rb
|
|
138
|
+
spec/ffi-tk/tile/button.rb
|
|
139
|
+
spec/ffi-tk/tile/checkbutton.rb
|
|
140
|
+
spec/ffi-tk/tile/combobox.rb
|
|
141
|
+
spec/ffi-tk/tile/entry.rb
|
|
142
|
+
spec/ffi-tk/tile/frame.rb
|
|
143
|
+
spec/ffi-tk/tile/label.rb
|
|
144
|
+
spec/ffi-tk/tile/labelframe.rb
|
|
145
|
+
spec/ffi-tk/tile/menubutton.rb
|
|
146
|
+
spec/ffi-tk/tile/notebook.rb
|
|
147
|
+
spec/ffi-tk/tile/panedwindow.rb
|
|
148
|
+
spec/ffi-tk/tile/progressbar.rb
|
|
149
|
+
spec/ffi-tk/tile/radiobutton.rb
|
|
150
|
+
spec/ffi-tk/tile/scale.rb
|
|
151
|
+
spec/ffi-tk/tile/scrollbar.rb
|
|
152
|
+
spec/ffi-tk/tile/separator.rb
|
|
153
|
+
spec/ffi-tk/tile/sizegrip.rb
|
|
154
|
+
spec/ffi-tk/tile/style.rb
|
|
155
|
+
spec/ffi-tk/tile/treeview.rb
|
|
156
|
+
spec/ffi-tk/variable.rb
|
|
157
|
+
spec/ffi-tk/widget/button.rb
|
|
158
|
+
spec/ffi-tk/widget/canvas.rb
|
|
159
|
+
spec/ffi-tk/widget/checkbutton.rb
|
|
160
|
+
spec/ffi-tk/widget/entry.rb
|
|
161
|
+
spec/ffi-tk/widget/frame.rb
|
|
162
|
+
spec/ffi-tk/widget/label.rb
|
|
163
|
+
spec/ffi-tk/widget/labelframe.rb
|
|
164
|
+
spec/ffi-tk/widget/listbox.rb
|
|
165
|
+
spec/ffi-tk/widget/menu.rb
|
|
166
|
+
spec/ffi-tk/widget/menubutton.rb
|
|
167
|
+
spec/ffi-tk/widget/message.rb
|
|
168
|
+
spec/ffi-tk/widget/panedwindow.rb
|
|
169
|
+
spec/ffi-tk/widget/radiobutton.rb
|
|
170
|
+
spec/ffi-tk/widget/root.rb
|
|
171
|
+
spec/ffi-tk/widget/scale.rb
|
|
172
|
+
spec/ffi-tk/widget/scrollbar.rb
|
|
173
|
+
spec/ffi-tk/widget/spinbox.rb
|
|
174
|
+
spec/ffi-tk/widget/text.rb
|
|
175
|
+
spec/ffi-tk/widget/toplevel.rb
|
|
176
|
+
spec/helper.rb
|
|
177
|
+
tasks/authors.rake
|
|
178
|
+
tasks/bacon.rake
|
|
179
|
+
tasks/changelog.rake
|
|
180
|
+
tasks/gem.rake
|
|
181
|
+
tasks/gem_setup.rake
|
|
182
|
+
tasks/grancher.rake
|
|
183
|
+
tasks/manifest.rake
|
|
184
|
+
tasks/rcov.rake
|
|
185
|
+
tasks/release.rake
|
|
186
|
+
tasks/reversion.rake
|
|
187
|
+
tasks/setup.rake
|
|
188
|
+
tasks/ycov.rake
|
data/README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# FFI::Tk
|
|
2
|
+
|
|
3
|
+
This library provides you with a wrapper for the Tk windowing toolkit.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
|
|
8
|
+
Right now this project only exists on github, and tarballs of the repository may
|
|
9
|
+
be obtained there.
|
|
10
|
+
Once feature-complete, a gem will be provided.
|
|
11
|
+
|
|
12
|
+
No compilation is required, but I'm not yet confident that this will run on
|
|
13
|
+
every architecture without changes, FFI::Tk is being developed on Archlinux and
|
|
14
|
+
Debian on Intel i686 and AMD x86_64, testers for other platforms are invited to
|
|
15
|
+
give it a try and report any problems that occur.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## Ruby-FFI
|
|
19
|
+
|
|
20
|
+
Ruby-FFI is a ruby extension for programmatically loading dynamic libraries,
|
|
21
|
+
binding functions within them, and calling those functions from Ruby code.
|
|
22
|
+
|
|
23
|
+
It lives at: http://wiki.github.com/ffi/ffi
|
|
24
|
+
|
|
25
|
+
Ruby-FFI ships with JRuby and Rubinius, and is available as a gem for MRI.
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## Hello, World!
|
|
29
|
+
|
|
30
|
+
require 'ffi-tk'
|
|
31
|
+
|
|
32
|
+
Tk.init
|
|
33
|
+
|
|
34
|
+
Tk::Button.new('.', text: 'Press me'){
|
|
35
|
+
Tk::MessageBox.new(message: 'Hello, World!')
|
|
36
|
+
}.pack
|
|
37
|
+
|
|
38
|
+
Tk.mainloop
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## Aims and Means
|
|
42
|
+
|
|
43
|
+
First of all, FFI::Tk doesn't try to be a drop-in replacement for the tk library
|
|
44
|
+
of Ruby's stdlib.
|
|
45
|
+
|
|
46
|
+
We will try to keep things as simple as possible, and there will not be 10
|
|
47
|
+
different ways to achieve the same thing through numerous aliases.
|
|
48
|
+
|
|
49
|
+
We will not rely on any compiled extensions and the only dependency is FFI to
|
|
50
|
+
keep things portable between different Ruby implementations (as far as they do
|
|
51
|
+
implement the 1.9.1 standard syntax and core functinoality.)
|
|
52
|
+
|
|
53
|
+
I (manveru) will not provide a version of FFI::Tk for 1.8.x, there may be other
|
|
54
|
+
persons that undertake this step, but due to lack of true encoding support it
|
|
55
|
+
will be significant overhead to cater to both versions as you can see if you
|
|
56
|
+
read a bit through the stdlib tk library.
|
|
57
|
+
We will provide only wrapping for the standard distribution of tcl/tk as of
|
|
58
|
+
version 8.5.7.
|
|
59
|
+
Earlier versions have not been tested, and later versions may be used by taking
|
|
60
|
+
advantage of the Tcl stub mechanism.
|
|
61
|
+
|
|
62
|
+
Custom extensions of tcl/tk may be wrapped by other people, and we will add a
|
|
63
|
+
link to any such project, but we try to keep things simple here.
|
|
64
|
+
|
|
65
|
+
A comprehensive suite of specs describes the behaviour of FFI::Tk as well as
|
|
66
|
+
possible.
|
|
67
|
+
|
|
68
|
+
The namespaces used are:
|
|
69
|
+
|
|
70
|
+
* Tk
|
|
71
|
+
* FFI::Tk
|
|
72
|
+
* FFI::Tcl
|
|
73
|
+
|
|
74
|
+
The Tk namespace conflicts with the name of the Ruby's stdlib tk, but the use of
|
|
75
|
+
them within one application is mutually exclusive anyway.
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
## License
|
|
79
|
+
|
|
80
|
+
FFI::Tk is distributed under MIT license.
|
|
81
|
+
Parts of the documentation were obtained from the tcl/tk manpages and modified
|
|
82
|
+
to clarify and apply to the specifics of the FFI::Tk wrapper.
|
|
83
|
+
These parts of the documentation are under Tcl license.
|
|
84
|
+
|
|
85
|
+
The licenses can be found in doc/TCL_LICENSE and doc/MIT_LICENSE respectively.
|
data/Rakefile
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
require 'rake'
|
|
2
|
+
require 'rake/clean'
|
|
3
|
+
require 'rake/gempackagetask'
|
|
4
|
+
require 'time'
|
|
5
|
+
require 'date'
|
|
6
|
+
|
|
7
|
+
PROJECT_SPECS = FileList['spec/ffi-tk/**/*.rb']
|
|
8
|
+
PROJECT_MODULE = 'FFI::Tk'
|
|
9
|
+
PROJECT_README = 'README.md'
|
|
10
|
+
PROJECT_VERSION = ENV['VERSION'] || Date.today.strftime('%Y.%m.%d')
|
|
11
|
+
|
|
12
|
+
DEPENDENCIES = {
|
|
13
|
+
'ffi' => {:version => '~> 0.5.1'},
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
DEVELOPMENT_DEPENDENCIES = {
|
|
17
|
+
'bacon' => {:version => '>= 1.1.0'},
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
GEMSPEC = Gem::Specification.new{|s|
|
|
21
|
+
s.name = 'ffi-tk'
|
|
22
|
+
s.author = "Michael 'manveru' Fellinger"
|
|
23
|
+
s.summary = "Pure Ruby FFI wrapper for the Tk GUI toolkit."
|
|
24
|
+
s.description = "Pure Ruby FFI wrapper for the Tk GUI toolkit."
|
|
25
|
+
s.email = 'm.fellinger@gmail.com'
|
|
26
|
+
s.homepage = 'http://github.com/manveru/ffi-tk'
|
|
27
|
+
s.platform = Gem::Platform::RUBY
|
|
28
|
+
s.version = PROJECT_VERSION
|
|
29
|
+
s.files = `git ls-files`.split("\n").sort
|
|
30
|
+
s.has_rdoc = true
|
|
31
|
+
s.require_path = 'lib'
|
|
32
|
+
s.required_rubygems_version = '>= 1.3.5'
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
DEPENDENCIES.each do |name, options|
|
|
36
|
+
GEMSPEC.add_dependency(name, options[:version])
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
DEVELOPMENT_DEPENDENCIES.each do |name, options|
|
|
40
|
+
GEMSPEC.add_development_dependency(name, options[:version])
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
Dir['tasks/*.rake'].each{|f| import(f) }
|
|
44
|
+
|
|
45
|
+
task :default => [:bacon]
|
|
46
|
+
|
|
47
|
+
CLEAN.include('')
|
data/TODO.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Todo List
|
|
2
|
+
|
|
3
|
+
Things left to do, most of this is simple, but still a lot of code.
|
|
4
|
+
Items are ordered roughly by their priority.
|
|
5
|
+
Done items should be removed after a couple of revisions.
|
|
6
|
+
|
|
7
|
+
An item is marked as done when:
|
|
8
|
+
* the code is complete.
|
|
9
|
+
* specs are written for all things possible to spec.
|
|
10
|
+
* the documentation has been sketched. I simply copy that part from the
|
|
11
|
+
offical doc first, but since we're not clear about copyright we might have
|
|
12
|
+
to use links and examples instead.
|
|
13
|
+
|
|
14
|
+
## Commands
|
|
15
|
+
|
|
16
|
+
Commands that operate on any widget as argument have highest priority.
|
|
17
|
+
|
|
18
|
+
[ ] image
|
|
19
|
+
[ ] photo
|
|
20
|
+
[ ] bitmap
|
|
21
|
+
[ ] loadTk
|
|
22
|
+
[ ] send
|
|
23
|
+
[ ] tk_bisque
|
|
24
|
+
|
|
25
|
+
## Widgets
|
|
26
|
+
|
|
27
|
+
The Tile widgets should have priority, as they will be needed most.
|
|
28
|
+
Some widgets don't have a tile equivalent, they have highes priority.
|
|
29
|
+
|
|
30
|
+
[ ] console
|
|
31
|
+
|
|
32
|
+
### Tile Widgets
|
|
33
|
+
|
|
34
|
+
[ ] ttk::style
|
|
35
|
+
[ ] ttk::frame
|
|
36
|
+
[ ] ttk::entry
|
|
37
|
+
[ ] ttk::label
|
|
38
|
+
[ ] ttk::treeview
|
|
39
|
+
[ ] ttk::progressbar
|
|
40
|
+
[ ] ttk::button
|
|
41
|
+
[ ] ttk::checkbutton
|
|
42
|
+
[ ] ttk::combobox
|
|
43
|
+
[ ] ttk::image
|
|
44
|
+
[ ] ttk::intro
|
|
45
|
+
[ ] ttk::labelframe
|
|
46
|
+
[ ] ttk::menubutton
|
|
47
|
+
[ ] ttk::notebook
|
|
48
|
+
[ ] ttk::panedwindow
|
|
49
|
+
[ ] ttk::radiobutton
|
|
50
|
+
[ ] ttk::scale
|
|
51
|
+
[ ] ttk::scrollbar
|
|
52
|
+
[ ] ttk::separator
|
|
53
|
+
[ ] ttk::sizegrip
|
|
54
|
+
[ ] ttk::widget
|
|
55
|
+
|
|
56
|
+
## Examples
|
|
57
|
+
|
|
58
|
+
There are a lot of examples that we can provide, both from the old Ruby bindings
|
|
59
|
+
and the Tk library.
|
|
60
|
+
They will have to be translated though, so it's still a lot of work.
|
|
61
|
+
Our current examples should be removed sometime, they are more or less just
|
|
62
|
+
proving that things run.
|
data/bin/rwish
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
if File.symlink?(__FILE__)
|
|
4
|
+
lib = File.expand_path('../../lib/ffi-tk', File.readlink(__FILE__))
|
|
5
|
+
else
|
|
6
|
+
lib = File.expand_path('../../lib/ffi-tk', __FILE__)
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
require lib
|
|
10
|
+
|
|
11
|
+
Tk.init
|
|
12
|
+
|
|
13
|
+
begin
|
|
14
|
+
require 'readline'
|
|
15
|
+
|
|
16
|
+
while line = Readline.readline('> ', true)
|
|
17
|
+
begin
|
|
18
|
+
p eval(line)
|
|
19
|
+
rescue => ex
|
|
20
|
+
puts "#{ex.class}: #{ex}", *ex.backtrace
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
rescue LoadError
|
|
24
|
+
while line = $stdin.gets
|
|
25
|
+
line.strip!
|
|
26
|
+
|
|
27
|
+
begin
|
|
28
|
+
p eval(line)
|
|
29
|
+
rescue => ex
|
|
30
|
+
puts "#{ex.class}: #{ex}", *ex.backtrace
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
data/doc/MIT_LICENSE
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Copyright (c) 2008 Michael Fellinger <m.fellinger@gmail.com>
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to
|
|
5
|
+
deal in the Software without restriction, including without limitation the
|
|
6
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
7
|
+
sell copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
|
11
|
+
all copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
16
|
+
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
17
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
18
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/doc/TCL_LICENSE
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
This software is copyrighted by the Regents of the University of
|
|
2
|
+
California, Sun Microsystems, Inc., and other parties. The following
|
|
3
|
+
terms apply to all files associated with the software unless explicitly
|
|
4
|
+
disclaimed in individual files.
|
|
5
|
+
|
|
6
|
+
The authors hereby grant permission to use, copy, modify, distribute,
|
|
7
|
+
and license this software and its documentation for any purpose, provided
|
|
8
|
+
that existing copyright notices are retained in all copies and that this
|
|
9
|
+
notice is included verbatim in any distributions. No written agreement,
|
|
10
|
+
license, or royalty fee is required for any of the authorized uses.
|
|
11
|
+
Modifications to this software may be copyrighted by their authors
|
|
12
|
+
and need not follow the licensing terms described here, provided that
|
|
13
|
+
the new terms are clearly indicated on the first page of each file where
|
|
14
|
+
they apply.
|
|
15
|
+
|
|
16
|
+
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
|
|
17
|
+
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
|
18
|
+
ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
|
|
19
|
+
DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
|
|
20
|
+
POSSIBILITY OF SUCH DAMAGE.
|
|
21
|
+
|
|
22
|
+
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
|
|
23
|
+
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
|
|
25
|
+
IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
|
|
26
|
+
NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
|
|
27
|
+
MODIFICATIONS.
|
|
28
|
+
|
|
29
|
+
GOVERNMENT USE: If you are acquiring this software on behalf of the
|
|
30
|
+
U.S. government, the Government shall have only "Restricted Rights"
|
|
31
|
+
in the software and related documentation as defined in the Federal
|
|
32
|
+
Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
|
|
33
|
+
are acquiring the software on behalf of the Department of Defense, the
|
|
34
|
+
software shall be classified as "Commercial Computer Software" and the
|
|
35
|
+
Government shall have only "Restricted Rights" as defined in Clause
|
|
36
|
+
252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
|
|
37
|
+
authors grant the U.S. Government and others acting in its behalf
|
|
38
|
+
permission to use and distribute the software in accordance with the
|
|
39
|
+
terms specified in this license.
|