teek 0.1.2 → 0.1.4

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.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -0
  3. data/Rakefile +121 -22
  4. data/ext/teek/extconf.rb +19 -1
  5. data/ext/teek/tcltkbridge.c +44 -2
  6. data/ext/teek/tcltkbridge.h +3 -0
  7. data/ext/teek/tkdrop.c +66 -0
  8. data/ext/teek/tkdrop.h +26 -0
  9. data/ext/teek/tkdrop_macos.m +141 -0
  10. data/ext/teek/tkdrop_win.c +232 -0
  11. data/ext/teek/tkdrop_x11.c +337 -0
  12. data/ext/teek/tkwin.c +42 -0
  13. data/lib/teek/platform.rb +29 -0
  14. data/lib/teek/version.rb +1 -1
  15. data/lib/teek.rb +248 -7
  16. data/teek.gemspec +3 -2
  17. metadata +7 -45
  18. data/sample/calculator.rb +0 -255
  19. data/sample/debug_demo.rb +0 -43
  20. data/sample/goldberg.rb +0 -1803
  21. data/sample/goldberg_helpers.rb +0 -170
  22. data/sample/minesweeper/assets/MINESWEEPER_0.png +0 -0
  23. data/sample/minesweeper/assets/MINESWEEPER_1.png +0 -0
  24. data/sample/minesweeper/assets/MINESWEEPER_2.png +0 -0
  25. data/sample/minesweeper/assets/MINESWEEPER_3.png +0 -0
  26. data/sample/minesweeper/assets/MINESWEEPER_4.png +0 -0
  27. data/sample/minesweeper/assets/MINESWEEPER_5.png +0 -0
  28. data/sample/minesweeper/assets/MINESWEEPER_6.png +0 -0
  29. data/sample/minesweeper/assets/MINESWEEPER_7.png +0 -0
  30. data/sample/minesweeper/assets/MINESWEEPER_8.png +0 -0
  31. data/sample/minesweeper/assets/MINESWEEPER_F.png +0 -0
  32. data/sample/minesweeper/assets/MINESWEEPER_M.png +0 -0
  33. data/sample/minesweeper/assets/MINESWEEPER_X.png +0 -0
  34. data/sample/minesweeper/minesweeper.rb +0 -452
  35. data/sample/optcarrot/vendor/optcarrot/apu.rb +0 -856
  36. data/sample/optcarrot/vendor/optcarrot/config.rb +0 -257
  37. data/sample/optcarrot/vendor/optcarrot/cpu.rb +0 -1162
  38. data/sample/optcarrot/vendor/optcarrot/driver.rb +0 -144
  39. data/sample/optcarrot/vendor/optcarrot/mapper/cnrom.rb +0 -14
  40. data/sample/optcarrot/vendor/optcarrot/mapper/mmc1.rb +0 -105
  41. data/sample/optcarrot/vendor/optcarrot/mapper/mmc3.rb +0 -153
  42. data/sample/optcarrot/vendor/optcarrot/mapper/uxrom.rb +0 -14
  43. data/sample/optcarrot/vendor/optcarrot/nes.rb +0 -105
  44. data/sample/optcarrot/vendor/optcarrot/opt.rb +0 -168
  45. data/sample/optcarrot/vendor/optcarrot/pad.rb +0 -92
  46. data/sample/optcarrot/vendor/optcarrot/palette.rb +0 -65
  47. data/sample/optcarrot/vendor/optcarrot/ppu.rb +0 -1468
  48. data/sample/optcarrot/vendor/optcarrot/rom.rb +0 -143
  49. data/sample/optcarrot/vendor/optcarrot.rb +0 -14
  50. data/sample/optcarrot.rb +0 -354
  51. data/sample/paint/assets/bucket.png +0 -0
  52. data/sample/paint/assets/cursor.png +0 -0
  53. data/sample/paint/assets/eraser.png +0 -0
  54. data/sample/paint/assets/pencil.png +0 -0
  55. data/sample/paint/assets/spray.png +0 -0
  56. data/sample/paint/layer.rb +0 -255
  57. data/sample/paint/layer_manager.rb +0 -179
  58. data/sample/paint/paint_demo.rb +0 -837
  59. data/sample/paint/sparse_pixel_buffer.rb +0 -202
  60. data/sample/sdl2_demo.rb +0 -318
  61. data/sample/threading_demo.rb +0 -494
data/sample/debug_demo.rb DELETED
@@ -1,43 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Demo of the Teek debugger window.
4
- # Run: ruby -Ilib sample/debug_demo.rb
5
-
6
- require 'teek'
7
-
8
- app = Teek::App.new(debug: true)
9
-
10
- # Show the main app window
11
- app.show
12
- app.set_window_title('Debug Demo App')
13
- app.set_window_geometry('300x200')
14
-
15
- # Create some widgets
16
- frame = app.create_widget('ttk::frame')
17
- app.command(:pack, frame, fill: :both, expand: 1, padx: 10, pady: 10)
18
-
19
- lbl = app.create_widget('ttk::label', parent: frame, text: 'Hello from the app')
20
- app.command(:pack, lbl, pady: 5)
21
-
22
- ent = app.create_widget('ttk::entry', parent: frame)
23
- app.command(:pack, ent, pady: 5)
24
-
25
- # Button that creates more widgets dynamically
26
- dynamic_widgets = []
27
- add_btn = app.create_widget('ttk::button', parent: frame, text: 'Add Widget',
28
- command: proc { |*|
29
- btn = app.create_widget('ttk::button', parent: frame, text: "Button #{dynamic_widgets.size + 1}")
30
- app.command(:pack, btn, pady: 2)
31
- dynamic_widgets << btn
32
- })
33
- app.command(:pack, add_btn, pady: 5)
34
-
35
- # Button to destroy last widget
36
- rm_btn = app.create_widget('ttk::button', parent: frame, text: 'Remove Widget',
37
- command: proc { |*|
38
- widget = dynamic_widgets.pop
39
- widget&.destroy
40
- })
41
- app.command(:pack, rm_btn, pady: 5)
42
-
43
- app.mainloop