fxruby 1.6.32-x86-mingw32 → 1.6.33-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/History.txt +8 -0
  3. data/README.rdoc +7 -4
  4. data/Rakefile +11 -0
  5. data/examples/WhatAQuietStiff.rb +1 -1
  6. data/examples/imageviewer.rb +1 -1
  7. data/examples/textedit/textedit.rb +8 -8
  8. data/ext/fox16_c/FXRuby.cpp +52 -20
  9. data/ext/fox16_c/extconf.rb +1 -0
  10. data/ext/fox16_c/include/FXRbWindow.h +2 -2
  11. data/ext/fox16_c/include/FXRuby.h +5 -1
  12. data/ext/fox16_c/markfuncs.cpp +24 -0
  13. data/lib/1.8/fox16_c.so +0 -0
  14. data/lib/1.9/fox16_c.so +0 -0
  15. data/lib/2.0/fox16_c.so +0 -0
  16. data/lib/2.1/fox16_c.so +0 -0
  17. data/lib/2.2/fox16_c.so +0 -0
  18. data/lib/fox16/core.rb +0 -8
  19. data/lib/fox16/thread.rb +2 -2
  20. data/lib/fox16/version.rb +1 -1
  21. data/ports/i586-mingw32msvc/bin/libFOX-1.6-0.dll +0 -0
  22. data/ports/i586-mingw32msvc/bin/libfxscintilla-20.dll +0 -0
  23. data/ports/i586-mingw32msvc/bin/libjpeg-8.dll +0 -0
  24. data/ports/i586-mingw32msvc/bin/libpng15-15.dll +0 -0
  25. data/ports/i586-mingw32msvc/bin/libtiff-5.dll +0 -0
  26. data/ports/i586-mingw32msvc/bin/zlib1.dll +0 -0
  27. data/ports/i686-w64-mingw32/bin/libFOX-1.6-0.dll +0 -0
  28. data/ports/i686-w64-mingw32/bin/libfxscintilla-20.dll +0 -0
  29. data/ports/i686-w64-mingw32/bin/libgcc_s_sjlj-1.dll +0 -0
  30. data/ports/i686-w64-mingw32/bin/libjpeg-8.dll +0 -0
  31. data/ports/i686-w64-mingw32/bin/libpng15-15.dll +0 -0
  32. data/ports/i686-w64-mingw32/bin/libstdc++-6.dll +0 -0
  33. data/ports/i686-w64-mingw32/bin/libtiff-5.dll +0 -0
  34. data/ports/i686-w64-mingw32/bin/libwinpthread-1.dll +0 -0
  35. data/ports/i686-w64-mingw32/bin/zlib1.dll +0 -0
  36. data/swig-interfaces/FXVec2d.i +1 -0
  37. data/swig-interfaces/FXVec2f.i +1 -0
  38. data/swig-interfaces/FXVec3d.i +1 -0
  39. data/swig-interfaces/FXVec3f.i +1 -0
  40. data/swig-interfaces/FXVec4d.i +1 -0
  41. data/swig-interfaces/FXVec4f.i +1 -0
  42. data/swig-interfaces/ruby-typemaps.i +15 -9
  43. data/test/TC_FXApp.rb +2 -2
  44. data/test/TC_FXCheckButton.rb +0 -5
  45. data/test/TC_FXDCPrint.rb +1 -1
  46. data/test/TC_FXFileStream.rb +1 -1
  47. data/test/TC_FXFont.rb +2 -2
  48. data/test/TC_FXId.rb +1 -1
  49. data/test/TC_FXImage.rb +2 -2
  50. data/test/TC_FXMainWindow.rb +1 -0
  51. data/test/TC_FXMat4f.rb +3 -3
  52. data/test/TC_FXMaterial.rb +1 -1
  53. data/test/TC_FXMenuCheck.rb +0 -5
  54. data/test/TC_FXMenuRadio.rb +0 -5
  55. data/test/TC_FXQuatf.rb +5 -5
  56. data/test/TC_FXRadioButton.rb +0 -5
  57. data/test/TC_FXRegion.rb +3 -3
  58. data/test/TC_FXShell.rb +1 -0
  59. data/test/TC_FXTable.rb +1 -1
  60. data/test/TC_FXVec4f.rb +1 -1
  61. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 538ff48606f437b5c8234710b35f79e8c7cb276f
4
- data.tar.gz: df1c1b2dfe623dc85cf2dd9c87f9fca226d76c94
3
+ metadata.gz: 75ffb1bf31368b4ec60a58c908d8b2944a16c6fc
4
+ data.tar.gz: c39dc0c3130aec21545875fcf86d7e4e986bdb18
5
5
  SHA512:
6
- metadata.gz: 552102ea639d51e7829bcb3467c6040dda819fea4473c448f97e39dcec0b0cf003f8db9f7b3b9bd2465d3bed8b7976dc5a896683f9e32c4ba03758b02791d6f0
7
- data.tar.gz: e130b4bb2a1005ef17cbb2ebaccf7d3354a0cda66655647c579c294ff9c88172fe99e1a4a145b0b02535ab3e722bce90006e0bce5f100533e83b0729314d01fe
6
+ metadata.gz: 0b3ab472ca46648a64d74b5099806b568fc0739f14bb3ec37581fef1543f7c44896120b0b02c331e7d35a824ba935016efb425ce800707ee129622bb34b54ea4
7
+ data.tar.gz: 9ab7eb8aed3589aabe7e340b3faceb4c5b7da01f8f6280fc1a5459bc76c577fa27582a3f8029c85ca85f53b78bbfac766a06029319e70533b339ce1ca25bd391
data/History.txt CHANGED
@@ -1,3 +1,11 @@
1
+ === 1.6.33 / 2015-08-20
2
+
3
+ * Avoid calls that are prohibited while GC phases during GC. Fixes #23
4
+ * Use copy'ing getters for FXVec members in FXMat*, FXMaterial and FXLight.
5
+ This fixes the TC_FXMaterial#test_bug test case.
6
+ * Fix test suite, so that all tests pass.
7
+ * Add a travis-ci test setup and connect it to the github account.
8
+
1
9
  === 1.6.32 / 2015-08-07
2
10
 
3
11
  * Avoid call to rb_class2name() during GC. Fixes #21
data/README.rdoc CHANGED
@@ -1,7 +1,9 @@
1
1
  = FXRuby
2
2
 
3
3
  * http://github.com/larskanis/fxruby
4
- * API: http://rubydoc.info/gems/fxruby/frames
4
+ * Full API-description: http://rubydoc.info/gems/fxruby/frames
5
+ * Latest fxruby {<img src="https://badge.fury.io/rb/fxruby.svg" alt="Gem Version" />}[http://badge.fury.io/rb/fxruby]
6
+ * Status (on Linux): {<img src="https://travis-ci.org/larskanis/fxruby.svg?branch=1.6" alt="Build Status" />}[https://travis-ci.org/larskanis/fxruby]
5
7
 
6
8
  == DESCRIPTION:
7
9
 
@@ -14,7 +16,7 @@ Ruby programming language that you already know and love, while at the
14
16
  same time taking advantage of the performance and functionality of a
15
17
  featureful, highly optimized C++ toolkit.
16
18
 
17
- == FEATURES/PROBLEMS:
19
+ == FEATURES:
18
20
 
19
21
  FXRuby supportes everything of FOX, that is useful in Ruby:
20
22
  * MDI/SDI application window layouts, floating toolbars
@@ -22,14 +24,15 @@ FXRuby supportes everything of FOX, that is useful in Ruby:
22
24
  * Flexible layout management
23
25
  * Image read/write support in many formats
24
26
  * Embedded OpenGL graphics
27
+ * Thread support
25
28
 
26
29
  == INSTALL:
27
30
 
28
- FXRuby runs on Linux, Windows and OS-X. Installation on *nix requires
31
+ FXRuby runs on Linux, Windows and OS-X with Ruby-1.9.3 or newer and with Rubinius. Installation on Unix requires
29
32
  FOX development headers and libraries installed:
30
33
  * on Debian/Ubuntu: <tt>sudo apt-get install g++ libxrandr-dev libfox-1.6-dev</tt>
31
34
  * see also detailed installation instructions in the {https://github.com/lylejohnson/fxruby/wiki Wiki}
32
- * no preparation needed on Windows - the binary gem can be used
35
+ * on Windows: the binary fxruby gems already contain all required libararies
33
36
 
34
37
  Then, install the gem:
35
38
  * gem install fxruby
data/Rakefile CHANGED
@@ -21,6 +21,9 @@ end
21
21
  # Some constants we'll need
22
22
  PKG_VERSION = Fox.fxrubyversion
23
23
 
24
+ LIBFXSCINTILLA_VERSION = ENV['LIBFXSCINTILLA_VERSION'] || '2.28.0'
25
+ LIBFXSCINTILLA_SOURCE_URI = "http://download.savannah.gnu.org/releases/fxscintilla/fxscintilla-#{LIBFXSCINTILLA_VERSION}.tar.gz"
26
+
24
27
  SWIG = (RUBY_PLATFORM =~ /mingw/) ? "swig.exe" : "swig"
25
28
  SWIGFLAGS = "-c++ -ruby -nodefaultdtor -nodefaultctor -w302 -features compactdefaultargs -I../fox-includes"
26
29
  SWIG_MODULES = {
@@ -99,6 +102,8 @@ task :test => [:compile]
99
102
  Rake::ExtensionTask.new("fox16_c", hoe.spec) do |ext|
100
103
  ext.cross_compile = true
101
104
  ext.cross_platform = ['x86-mingw32', 'x64-mingw32']
105
+ # Enable FXTRACE and FXASSERT for 'rake compile'
106
+ ext.config_options << "--enable-debug"
102
107
 
103
108
  ext.cross_config_options += [
104
109
  "--enable-win32-cross",
@@ -253,6 +258,12 @@ namespace :fxruby do
253
258
  file "ext/fox16_c/extconf.rb" => ['ext/fox16_c/swigruby.h', 'ext/fox16_c/impl.cpp', 'ext/fox16_c/include/inlinestubs.h'] +
254
259
  SWIG_MODULES.map{|ifile, cppfile| File.join("ext/fox16_c", cppfile) }
255
260
 
261
+
262
+ directory "ports/archives"
263
+ file "ports/archives/fxscintilla-2.28.0.tar.gz" => ["ports/archives"] do |t|
264
+ sh "wget #{LIBFXSCINTILLA_SOURCE_URI} -O #{t.name}"
265
+ end
266
+
256
267
  directory "tmp/fxscintilla"
257
268
  task "tmp/fxscintilla/fxscintilla-2.28.0/include/Scintilla.iface" => ["tmp/fxscintilla", "ports/archives/fxscintilla-2.28.0.tar.gz"] do
258
269
  chdir "tmp/fxscintilla" do
@@ -134,7 +134,7 @@ class WhatAQuietWindow < FXMainWindow
134
134
  saveDialog = FXFileDialog.new(self, "Save Image")
135
135
  saveDialog.filename = @itemList.getItemText(@itemList.currentItem)
136
136
  if saveDialog.execute != 0
137
- if File.exists? saveDialog.filename
137
+ if File.exist? saveDialog.filename
138
138
  if MBOX_CLICKED_NO == FXMessageBox.question(self, MBOX_YES_NO,
139
139
  "Overwrite Image", "Overwrite existing image?")
140
140
  return 1
@@ -326,7 +326,7 @@ class ImageWindow < FXMainWindow
326
326
  def onCmdSave(sender, sel, ptr)
327
327
  saveDialog = FXFileDialog.new(self, "Save Image")
328
328
  if saveDialog.execute != 0
329
- if File.exists? saveDialog.filename
329
+ if File.exist? saveDialog.filename
330
330
  if MBOX_CLICKED_NO == FXMessageBox.question(self, MBOX_YES_NO,
331
331
  "Overwrite Image", "Overwrite existing image?")
332
332
  return 1
@@ -1025,7 +1025,7 @@ class TextWindow < FXMainWindow
1025
1025
  return false if (savedialog.execute == 0)
1026
1026
  setCurrentPattern(savedialog.currentPattern)
1027
1027
  file = savedialog.filename
1028
- if File.exists?(file)
1028
+ if File.exist?(file)
1029
1029
  if MBOX_CLICKED_NO == FXMessageBox.question(self, MBOX_YES_NO,
1030
1030
  "Overwrite Document", "Overwrite existing document: #{file}?")
1031
1031
  return false
@@ -1092,7 +1092,7 @@ class TextWindow < FXMainWindow
1092
1092
  if savedialog.execute != 0
1093
1093
  setCurrentPattern(savedialog.currentPattern)
1094
1094
  file = savedialog.filename
1095
- if File.exists?(file)
1095
+ if File.exist?(file)
1096
1096
  if MBOX_CLICKED_NO == FXMessageBox.question(self, MBOX_YES_NO,
1097
1097
  "Overwrite Document", "Overwrite existing document: #{file}?")
1098
1098
  return 1
@@ -1134,24 +1134,24 @@ class TextWindow < FXMainWindow
1134
1134
  # Attempt to extract the file name from various forms
1135
1135
  if string =~ /#include \".*\"/
1136
1136
  file = File.expand_path(name, dir)
1137
- if !File.exists?(file)
1137
+ if !File.exist?(file)
1138
1138
  Find.find(@searchpath) { |f| file = f if (f == name) }
1139
1139
  end
1140
1140
  elsif string =~ /#include <.*>/
1141
1141
  file = File.expand_path(name, dir)
1142
- if !File.exists?(file)
1142
+ if !File.exist?(file)
1143
1143
  Find.find(@searchpath) { |f| file = f if (f == name) }
1144
1144
  end
1145
1145
  elsif string =~ /.*:.*:.*/
1146
1146
  file = File.expand_path(name, dir)
1147
- if !File.exists?(file)
1147
+ if !File.exist?(file)
1148
1148
  Find.find(@searchpath) { |f| file = f if (f == name) }
1149
1149
  end
1150
1150
  else
1151
1151
  file = File.expand_path(string, dir)
1152
1152
  end
1153
1153
 
1154
- if File.exists?(file)
1154
+ if File.exist?(file)
1155
1155
  # Different from current file?
1156
1156
  if file != @filename
1157
1157
  # Save old file first
@@ -1213,7 +1213,7 @@ class TextWindow < FXMainWindow
1213
1213
  if savedialog.execute != 0
1214
1214
  setCurrentPattern(savedialog.currentPattern)
1215
1215
  file = savedialog.filename
1216
- if File.exists?(file)
1216
+ if File.exist?(file)
1217
1217
  if MBOX_CLICKED_NO == FXMessageBox.question(self, MBOX_YES_NO,
1218
1218
  "Overwrite Document", "Overwrite existing document: #{file}?")
1219
1219
  return 1
@@ -1690,7 +1690,7 @@ class TextWindow < FXMainWindow
1690
1690
 
1691
1691
  # Update box for readonly display
1692
1692
  def onCheckFile(sender, sel, ptr)
1693
- mtime = File.exists?(@filename) ? File.mtime(@filename) : nil
1693
+ mtime = File.exist?(@filename) ? File.mtime(@filename) : nil
1694
1694
  if @filetime && mtime && mtime != @filetime
1695
1695
  @filetime = mtime
1696
1696
  if MBOX_CLICKED_OK == FXMessageBox.warning(self, MBOX_OK_CANCEL,
@@ -85,12 +85,19 @@ static st_table * FXRuby_Objects;
85
85
 
86
86
  static const char * const safe_rb_obj_classname(VALUE obj)
87
87
  {
88
- if( rb_during_gc() ){
88
+ int tdata = TYPE(obj)==T_DATA;
89
+ if( (tdata && FXRbIsInGC(DATA_PTR(obj)))
90
+ #ifdef HAVE_RB_DURING_GC
91
+ || rb_during_gc()
92
+ #endif
93
+ ){
89
94
  /* It's not safe to call rb_obj_classname() during GC.
90
95
  * Return dummy value in this case. */
91
96
  return "during GC";
92
- } else {
97
+ } else if (tdata) {
93
98
  return rb_obj_classname(obj);
99
+ } else {
100
+ return "no T_DATA";
94
101
  }
95
102
  }
96
103
 
@@ -161,6 +168,31 @@ bool FXRbIsBorrowed(void* ptr){
161
168
  }
162
169
  }
163
170
 
171
+ bool FXRbSetInGC(const void* ptr, bool enabled){
172
+ FXASSERT(ptr!=0);
173
+ FXRubyObjDesc *desc;
174
+ if(st_lookup(FXRuby_Objects,reinterpret_cast<st_data_t>(ptr),reinterpret_cast<st_data_t *>(&desc))!=0){
175
+ desc->in_gc=enabled;
176
+ return enabled;
177
+ }
178
+ return false;
179
+ }
180
+
181
+ bool FXRbIsInGC(const void* ptr){
182
+ FXASSERT(ptr!=0);
183
+ FXRubyObjDesc *desc;
184
+
185
+ #ifdef HAVE_RB_DURING_GC
186
+ if( rb_during_gc() ){
187
+ return true;
188
+ }
189
+ #endif
190
+ if(st_lookup(FXRuby_Objects,reinterpret_cast<st_data_t>(ptr),reinterpret_cast<st_data_t *>(&desc))!=0){
191
+ return desc->in_gc;
192
+ }
193
+ return false;
194
+ }
195
+
164
196
 
165
197
  /**
166
198
  * FXRbConvertPtr() is just a wrapper around SWIG_ConvertPtr().
@@ -343,12 +375,13 @@ VALUE to_ruby(const FXObject* obj){
343
375
  * Return the registered Ruby class instance associated with this
344
376
  * FOX object, or Qnil if not found.
345
377
  */
346
- VALUE FXRbGetRubyObj(const void *foxObj,bool alsoBorrowed){
378
+ VALUE FXRbGetRubyObj(const void *foxObj,bool alsoBorrowed, bool in_gc){
347
379
  FXRubyObjDesc* desc;
348
380
  if(foxObj!=0 && st_lookup(FXRuby_Objects,reinterpret_cast<st_data_t>(const_cast<void*>(foxObj)),reinterpret_cast<st_data_t *>(&desc))!=0){
349
381
  FXASSERT(desc!=0);
350
382
  if(alsoBorrowed || !desc->borrowed){
351
- FXTRACE((2,"FXRbGetRubyObj(foxObj=%p) => rubyObj=%p (%s)\n",foxObj,(void *)desc->obj,safe_rb_obj_classname(desc->obj)));
383
+ const char *classname = in_gc ? "in GC" : safe_rb_obj_classname(desc->obj);
384
+ FXTRACE((2,"FXRbGetRubyObj(foxObj=%p) => rubyObj=%p (%s)\n", foxObj, (void *)desc->obj, classname));
352
385
  return desc->obj;
353
386
  }
354
387
  }
@@ -362,23 +395,21 @@ VALUE FXRbGetRubyObj(const void *foxObj,bool alsoBorrowed){
362
395
  VALUE FXRbGetRubyObj(const void *foxObj,swig_type_info* ty){
363
396
  if(foxObj!=0){
364
397
  VALUE rbObj=FXRbGetRubyObj(foxObj,true);
365
- return NIL_P(rbObj) ? FXRbNewPointerObj(const_cast<void*>(foxObj),ty) : rbObj;
398
+ if( NIL_P(rbObj) ){
399
+ return FXRbNewPointerObj(const_cast<void*>(foxObj),ty);
400
+ }else{
401
+ // The requested type should match the registered class.
402
+ FXASSERT(SWIG_CheckConvert(rbObj, ty));
403
+ return rbObj;
366
404
  }
367
- else{
405
+ }else{
368
406
  return Qnil;
369
- }
370
407
  }
408
+ }
371
409
 
372
410
  VALUE FXRbGetRubyObj(const void *foxObj,const char *type){
373
- if(foxObj!=0){
374
- FXASSERT(type!=0);
375
- VALUE rbObj=FXRbGetRubyObj(foxObj,true);
376
- return NIL_P(rbObj) ? FXRbNewPointerObj(const_cast<void*>(foxObj),FXRbTypeQuery(type)) : rbObj;
377
- }
378
- else{
379
- return Qnil;
380
- }
381
- }
411
+ return FXRbGetRubyObj(foxObj, FXRbTypeQuery(type));
412
+ }
382
413
 
383
414
  /**
384
415
  * Look up the Ruby instance associated with this C++ object, if any, and mark
@@ -402,7 +433,7 @@ void FXRbGcMark(void *obj){
402
433
  * example program works if you invoke the GC in ShutterWindow#create;
403
434
  * make sure that the shutter items' contents don't get blown away!
404
435
  */
405
- VALUE value=FXRbGetRubyObj(obj,true);
436
+ VALUE value=FXRbGetRubyObj(obj,true, true);
406
437
  if(!NIL_P(value)){
407
438
  rb_gc_mark(value);
408
439
  }
@@ -1427,6 +1458,7 @@ void FXRbRange2LoHi(VALUE range,FXdouble& lo,FXdouble& hi){
1427
1458
  void FXRbCallVoidMethod_gvlcb(FXObject* recv, const char *func) {
1428
1459
  VALUE obj=FXRbGetRubyObj(recv,false);
1429
1460
  FXASSERT(!NIL_P(obj));
1461
+ FXASSERT(!FXRbIsInGC(recv));
1430
1462
  rb_funcall(obj,rb_intern(func),0,NULL);
1431
1463
  }
1432
1464
 
@@ -1633,7 +1665,7 @@ void FXRbCallDCDrawMethod_gvlcb(FXDC* recv, const char * func, FXint x,FXint y,c
1633
1665
  FXRbMenuCommand::~FXRbMenuCommand(){
1634
1666
  FXAccelTable *table;
1635
1667
  FXWindow *owner;
1636
- if(acckey && !rb_during_gc()){
1668
+ if(acckey && !FXRbIsInGC(this)){
1637
1669
  owner=getShell()->getOwner();
1638
1670
  if(owner){
1639
1671
  table=owner->getAccelTable();
@@ -1649,7 +1681,7 @@ FXRbMenuCommand::~FXRbMenuCommand(){
1649
1681
  FXRbMenuCheck::~FXRbMenuCheck(){
1650
1682
  FXAccelTable *table;
1651
1683
  FXWindow *owner;
1652
- if(acckey && !rb_during_gc()){
1684
+ if(acckey && !FXRbIsInGC(this)){
1653
1685
  owner=getShell()->getOwner();
1654
1686
  if(owner){
1655
1687
  table=owner->getAccelTable();
@@ -1665,7 +1697,7 @@ FXRbMenuCheck::~FXRbMenuCheck(){
1665
1697
  FXRbMenuRadio::~FXRbMenuRadio(){
1666
1698
  FXAccelTable *table;
1667
1699
  FXWindow *owner;
1668
- if(acckey && !rb_during_gc()){
1700
+ if(acckey && !FXRbIsInGC(this)){
1669
1701
  owner=getShell()->getOwner();
1670
1702
  if(owner){
1671
1703
  table=owner->getAccelTable();
@@ -318,6 +318,7 @@ def do_rake_compiler_setup
318
318
  have_func('rb_thread_call_without_gvl') &&
319
319
  have_func('rb_thread_call_with_gvl')
320
320
 
321
+ have_func('rb_during_gc')
321
322
  end
322
323
 
323
324
  # This directive processes the "--with-fox-include" and "--with-fox-lib"
@@ -149,7 +149,7 @@ inline void klass ## _dropDisable(klass* self){ \
149
149
  FXRbCallVoidMethod(this,"killFocus"); \
150
150
  } \
151
151
  void cls::changeFocus(FXWindow* child){ \
152
- if(!rb_during_gc()) FXRbCallVoidMethod(this,"changeFocus",child); \
152
+ if(!FXRbIsInGC(this)) FXRbCallVoidMethod(this,"changeFocus",child); \
153
153
  } \
154
154
  void cls::setDefault(FXbool enable){ \
155
155
  FXRbCallVoidMethod(this,"setDefault",enable); \
@@ -173,7 +173,7 @@ inline void klass ## _dropDisable(klass* self){ \
173
173
  FXRbCallVoidMethod(this,"position",x,y,w,h); \
174
174
  } \
175
175
  void cls::recalc(){ \
176
- if(!rb_during_gc()) FXRbCallVoidMethod(this,"recalc"); \
176
+ if(!FXRbIsInGC(this)) FXRbCallVoidMethod(this,"recalc"); \
177
177
  } \
178
178
  void cls::reparent(FXWindow* father,FXWindow* other){ \
179
179
  FXRbCallVoidMethod(this,"reparent",father,other); \
@@ -81,6 +81,8 @@ VALUE showHelper(VALUE self, int argc, VALUE *argv, TYPE *p, swig_type_info *typ
81
81
  // Wrapper around SWIG_Ruby_NewPointerObj()
82
82
  VALUE FXRbNewPointerObj(void *ptr, swig_type_info *typeinfo);
83
83
  bool FXRbIsBorrowed(void* ptr);
84
+ bool FXRbSetInGC(const void* ptr, bool enabled);
85
+ bool FXRbIsInGC(const void* ptr);
84
86
 
85
87
  // Wrapper around SWIG_TypeQuery()
86
88
  swig_type_info *FXRbTypeQuery(const char *name);
@@ -124,7 +126,7 @@ void FXRbDestroyAppSensitiveObjects();
124
126
  * FOX object (if any). If searchBoth is false, only considers the
125
127
  * Ruby-owned objects; otherwise considers all outstanding references.
126
128
  */
127
- VALUE FXRbGetRubyObj(const void *foxObj, bool searchBoth);
129
+ VALUE FXRbGetRubyObj(const void *foxObj, bool searchBoth, bool in_gc=false);
128
130
 
129
131
  /**
130
132
  * Return the registered Ruby class instance associated with this
@@ -367,6 +369,7 @@ template<class TYPE>
367
369
  void FXRbCallVoidMethod_gvlcb(FXObject* recv,const char *func, TYPE& arg){
368
370
  VALUE obj=FXRbGetRubyObj(recv,false);
369
371
  FXASSERT(!NIL_P(obj));
372
+ FXASSERT(!FXRbIsInGC(recv));
370
373
  rb_funcall(obj,rb_intern(func),1,to_ruby(arg));
371
374
  FXRbUnregisterBorrowedRubyObj(&arg);
372
375
  }
@@ -383,6 +386,7 @@ template<class TYPE>
383
386
  void FXRbCallVoidMethod_gvlcb(const FXObject* recv, const char *func, TYPE& arg){
384
387
  VALUE obj=FXRbGetRubyObj(recv,false);
385
388
  FXASSERT(!NIL_P(obj));
389
+ FXASSERT(!FXRbIsInGC(recv));
386
390
  rb_funcall(obj,rb_intern(func),1,to_ruby(arg));
387
391
  FXRbUnregisterBorrowedRubyObj(&arg);
388
392
  }
@@ -53,6 +53,19 @@ void FXRbObject::markfunc(FXObject* obj){
53
53
  FXTRACE((100,"%s::markfunc(%p)\n",obj?obj->getClassName():"FXRbObject",obj));
54
54
  }
55
55
 
56
+ static void FXRbSetInGCParentsRecursive(FXWindow *window, bool enabled){
57
+ FXRbSetInGC( window, true );
58
+ if(window->getParent()) FXRbSetInGCParentsRecursive( window->getParent(), enabled );
59
+ }
60
+
61
+ static void FXRbSetInGCChildrenRecursive(FXWindow *window, bool enabled){
62
+ FXRbSetInGC( window, true );
63
+ for(FXWindow* child=window->getFirst(); child; child=child->getNext()){
64
+ FXRbSetInGCChildrenRecursive( child, enabled );
65
+ }
66
+ }
67
+
68
+
56
69
  void FXRbObject::freefunc(FXObject* self){
57
70
  if(self!=0){
58
71
  // Unregister, but don't destroy, borrowed references
@@ -65,6 +78,17 @@ void FXRbObject::freefunc(FXObject* self){
65
78
  FXASSERT(classname!=0);
66
79
  FXASSERT(strlen(classname)>3);
67
80
  if(classname[0]=='F' && classname[1]=='X' && classname[2]=='R' && classname[3]=='b'){
81
+ // FXWindow destructor calls recalc() and changeFocus() of it's parent window.
82
+ // Since these methods are routed back to Ruby code, but calling Ruby code from
83
+ // GC isn't a good idea, we mark the parent window as "in_gc", so that it will
84
+ // ignore recalc() and changeFocus() calls completely.
85
+ // The parent window should also be scheduled to be free'd. In the other case,
86
+ // the child window would have been marked as used.
87
+ if(self->isMemberOf(FXMETACLASS(FXWindow))){
88
+ FXWindow *window = dynamic_cast<FXWindow*>(self);
89
+ FXRbSetInGCParentsRecursive( window, true );
90
+ FXRbSetInGCChildrenRecursive( window, true );
91
+ }
68
92
  delete self;
69
93
  }
70
94
  else{
data/lib/1.8/fox16_c.so CHANGED
Binary file
data/lib/1.9/fox16_c.so CHANGED
Binary file
data/lib/2.0/fox16_c.so CHANGED
Binary file
data/lib/2.1/fox16_c.so CHANGED
Binary file
data/lib/2.2/fox16_c.so CHANGED
Binary file
data/lib/fox16/core.rb CHANGED
@@ -625,14 +625,6 @@ module Fox
625
625
  end
626
626
  end
627
627
 
628
- class FXHVec
629
- def normalize!
630
- normalized = self.normalize
631
- 0.upto(3) { |idx| self[idx] = normalized[idx] }
632
- self
633
- end
634
- end
635
-
636
628
  class FXTable
637
629
  #
638
630
  # Append _numColumns_ columns to the right of the table..
data/lib/fox16/thread.rb CHANGED
@@ -13,7 +13,7 @@ module Fox
13
13
 
14
14
  def runOnUiThread(&block)
15
15
  @event_handler_events << block
16
- @event_handler_pwr.write 'e' if @event_handler_pwr
16
+ @event_handler_pwr.write 'e'
17
17
  end
18
18
 
19
19
  private
@@ -34,7 +34,7 @@ module Fox
34
34
  end
35
35
 
36
36
  def event_handler_pull(prd)
37
- prd.read(1) if prd
37
+ prd.read(1)
38
38
  while !@event_handler_events.empty?
39
39
  ev = @event_handler_events.shift
40
40
  ev.call
data/lib/fox16/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Fox
2
2
  def Fox.fxrubyversion
3
- "1.6.32"
3
+ "1.6.33"
4
4
  end
5
5
  end
Binary file
Binary file
@@ -20,6 +20,7 @@
20
20
  * at "lyle@lylejohnson.name".
21
21
  ***********************************************************************/
22
22
 
23
+ %naturalvar FXVec2d;
23
24
  /// Double-precision 2-element vector
24
25
  class FXVec2d {
25
26
  public:
@@ -20,6 +20,7 @@
20
20
  * at "lyle@lylejohnson.name".
21
21
  ***********************************************************************/
22
22
 
23
+ %naturalvar FXVec2f;
23
24
  /// Single-precision 2-element vector
24
25
  class FXVec2f {
25
26
  public:
@@ -20,6 +20,7 @@
20
20
  * at "lyle@lylejohnson.name".
21
21
  ***********************************************************************/
22
22
 
23
+ %naturalvar FXVec3d;
23
24
  /// Double-precision 3-element vector
24
25
  class FXVec3d {
25
26
  public:
@@ -20,6 +20,7 @@
20
20
  * at "lyle@lylejohnson.name".
21
21
  ***********************************************************************/
22
22
 
23
+ %naturalvar FXVec3f;
23
24
  /// Single-precision 3-element vector
24
25
  class FXVec3f {
25
26
  public:
@@ -21,6 +21,7 @@
21
21
  ***********************************************************************/
22
22
 
23
23
  %rename("crosses?") FXVec4d::crosses(const FXVec3d& a,const FXVec3d& b) const;
24
+ %naturalvar FXVec4d;
24
25
 
25
26
  /// Double-precision 4-element vector
26
27
  class FXVec4d {
@@ -21,6 +21,7 @@
21
21
  ***********************************************************************/
22
22
 
23
23
  %rename("crosses?") FXVec4f::crosses(const FXVec3f& a,const FXVec3f& b) const;
24
+ %naturalvar FXVec4f;
24
25
 
25
26
  /// Single-precision 4-element vector
26
27
  class FXVec4f {
@@ -493,13 +493,27 @@ inline void* to_FXEvent(VALUE obj){
493
493
  %typemap(out) FXVec2f* "$result = FXRbGetRubyObj($1, \"$1_ltype\");";
494
494
  %typemap(out) FXVec2f& "$result = FXRbGetRubyObj($1, \"$1_ltype\");";
495
495
 
496
+ /* Output typemap for FXVec3f instances */
497
+ %typemap(out) FXVec3f {
498
+ FXVec3f* resultptr = new FXVec3f($1);
499
+ $result = FXRbGetRubyObj(resultptr, "FXVec3f *");
500
+ }
501
+ %typemap(out) FXVec3f* "$result = FXRbGetRubyObj($1, \"$1_ltype\");";
502
+ %typemap(out) const FXVec3f& {
503
+ FXVec3f* resultptr = new FXVec3f(*$1);
504
+ $result = FXRbGetRubyObj(resultptr, "FXVec3f *");
505
+ }
506
+
496
507
  /* Output typemap for FXVec4f instances */
497
508
  %typemap(out) FXVec4f {
498
509
  FXVec4f* resultptr = new FXVec4f($1);
499
510
  $result = FXRbGetRubyObj(resultptr, "FXVec4f *");
500
511
  }
501
512
  %typemap(out) FXVec4f* "$result = FXRbGetRubyObj($1, \"$1_ltype\");";
502
- %typemap(out) FXVec4f& "$result = FXRbGetRubyObj($1, \"$1_ltype\");";
513
+ %typemap(out) const FXVec4f& {
514
+ FXVec4f* resultptr = new FXVec4f(*$1);
515
+ $result = FXRbGetRubyObj(resultptr, "FXVec4f *");
516
+ }
503
517
 
504
518
  /* Output typemap for FXIcon instances */
505
519
  %typemap(out) FXIcon * = FXObject *;
@@ -610,14 +624,6 @@ inline void* to_FXEvent(VALUE obj){
610
624
  /* Output typemap for FXTreeItem instances */
611
625
  %typemap(out) FXTreeItem * = FXObject *;
612
626
 
613
- /* Output typemap for FXVec3f instances */
614
- %typemap(out) FXVec3f {
615
- FXVec3f* resultptr = new FXVec3f($1);
616
- $result = FXRbGetRubyObj(resultptr, "FXVec3f *");
617
- }
618
- %typemap(out) FXVec3f* "$result = FXRbGetRubyObj($1, \"$1_ltype\");";
619
- %typemap(out) const FXVec3f& "$result = FXRbGetRubyObj($1, \"$1_ltype\");";
620
-
621
627
  /* Output typemap for FXVerticalFrame instances */
622
628
  %typemap(out) FXVerticalFrame * = FXObject *;
623
629
 
data/test/TC_FXApp.rb CHANGED
@@ -8,7 +8,7 @@ class TC_FXApp < Test::Unit::TestCase
8
8
 
9
9
  def test_exception_for_second_app
10
10
  assert_raise RuntimeError do
11
- app2 = FXApp.new
11
+ FXApp.new
12
12
  end
13
13
  end
14
14
  end
@@ -46,7 +46,7 @@ class TC_FXApp2 < Fox::TestCase
46
46
  end
47
47
 
48
48
  def test_addInput_on_pipe
49
- check_events *IO.pipe
49
+ check_events(*IO.pipe)
50
50
  end
51
51
 
52
52
  def test_addInput_on_socket_accept
@@ -12,7 +12,6 @@ class TC_FXCheckButton < Fox::TestCase
12
12
 
13
13
  def test_setCheck_TRUE
14
14
  @checkButton.check = Fox::TRUE
15
- assert_equal(true, @checkButton.check)
16
15
  assert_equal(Fox::TRUE, @checkButton.checkState)
17
16
  assert(@checkButton.checked?)
18
17
  assert(!@checkButton.unchecked?)
@@ -21,7 +20,6 @@ class TC_FXCheckButton < Fox::TestCase
21
20
 
22
21
  def test_setCheck_FALSE
23
22
  @checkButton.check = Fox::FALSE
24
- assert_equal(false, @checkButton.check)
25
23
  assert_equal(Fox::FALSE, @checkButton.checkState)
26
24
  assert(!@checkButton.checked?)
27
25
  assert(@checkButton.unchecked?)
@@ -30,7 +28,6 @@ class TC_FXCheckButton < Fox::TestCase
30
28
 
31
29
  def test_setCheck_MAYBE
32
30
  @checkButton.check = Fox::MAYBE
33
- assert_equal(true, @checkButton.check) # this is not a typo!
34
31
  assert_equal(Fox::MAYBE, @checkButton.checkState)
35
32
  assert(!@checkButton.checked?)
36
33
  assert(!@checkButton.unchecked?)
@@ -39,7 +36,6 @@ class TC_FXCheckButton < Fox::TestCase
39
36
 
40
37
  def test_setCheck_true
41
38
  @checkButton.check = true
42
- assert_equal(true, @checkButton.check)
43
39
  assert_equal(Fox::TRUE, @checkButton.checkState)
44
40
  assert(@checkButton.checked?)
45
41
  assert(!@checkButton.unchecked?)
@@ -48,7 +44,6 @@ class TC_FXCheckButton < Fox::TestCase
48
44
 
49
45
  def test_setCheck_false
50
46
  @checkButton.check = false
51
- assert_equal(false, @checkButton.check)
52
47
  assert_equal(Fox::FALSE, @checkButton.checkState)
53
48
  assert(!@checkButton.checked?)
54
49
  assert(@checkButton.unchecked?)
data/test/TC_FXDCPrint.rb CHANGED
@@ -95,7 +95,7 @@ public
95
95
  end
96
96
 
97
97
  def teardown
98
- if File.exists?("output.ps")
98
+ if File.exist?("output.ps")
99
99
  FileUtils.rm_f("output.ps")
100
100
  end
101
101
  end
@@ -82,7 +82,7 @@ class TC_FXFileStream < Test::Unit::TestCase
82
82
  end
83
83
 
84
84
  def teardown
85
- if File.exists?("goobers")
85
+ if File.exist?("goobers")
86
86
  FileUtils.rm_f("goobers")
87
87
  end
88
88
  end
data/test/TC_FXFont.rb CHANGED
@@ -15,7 +15,7 @@ class TC_FXFont < Test::Unit::TestCase
15
15
 
16
16
  def testConstructFromFontDescription
17
17
  fontdesc = @app.normalFont.fontDesc
18
- font = FXFont.new(@app, fontdesc)
18
+ FXFont.new(@app, fontdesc)
19
19
  end
20
20
 
21
21
  def testConstructFromParameters
@@ -42,7 +42,7 @@ class TC_FXFont < Test::Unit::TestCase
42
42
  end
43
43
 
44
44
  def testConstructFromFontString
45
- font = FXFont.new(@app, "")
45
+ FXFont.new(@app, "")
46
46
  end
47
47
 
48
48
  def testGetTextWidthAndHeight
data/test/TC_FXId.rb CHANGED
@@ -11,7 +11,7 @@ class TC_FXId < Fox::TestCase
11
11
 
12
12
  def test_created?
13
13
  assert !mainWindow.created?
14
- app.create
14
+ mainWindow.create
15
15
  assert mainWindow.created?, "main window should be created after call to FXApp#create"
16
16
  mainWindow.destroy
17
17
  assert !mainWindow.created?
data/test/TC_FXImage.rb CHANGED
@@ -119,7 +119,7 @@ class TC_FXImage < Fox::TestCase
119
119
  def test_create_with_non_owned_data
120
120
  GC.stress = true
121
121
  img = image_with_non_owned_data
122
- " " * 10000
122
+ _ = " " * 10000
123
123
  GC.stress = false
124
124
  assert_equal("rgbaRGBA", img.pixel_string)
125
125
  assert_equal(0, img.options)
@@ -134,7 +134,7 @@ class TC_FXImage < Fox::TestCase
134
134
  img = FXImage.new(app, nil, 0, 1, 2)
135
135
  GC.stress = true
136
136
  set_non_owned_data(img)
137
- " " * 10000
137
+ _ = " " * 10000
138
138
  GC.stress = false
139
139
  assert_equal("rgbaRGBA", img.pixel_string)
140
140
  assert_equal(0, img.options)
@@ -11,6 +11,7 @@ class TC_FXMainWindow < Test::Unit::TestCase
11
11
  end
12
12
 
13
13
  def test_non_created_app_raises_runtime_error
14
+ pend "two FXApp are not allowed"
14
15
  app = FXApp.new
15
16
  assert_raise RuntimeError do
16
17
  FXMainWindow.new(app, "title").create
data/test/TC_FXMat4f.rb CHANGED
@@ -81,9 +81,9 @@ class TC_FXMat4f < Test::Unit::TestCase
81
81
  def test_mul_by_scalar
82
82
  p = FXMat4f.new.eye
83
83
  q = FXMat4f.new(4.0, 0.0, 0.0, 0.0,
84
- 0.0, 4.0, 0.0, 0.0,
85
- 0.0, 0.0, 4.0, 0.0,
86
- 0.0, 0.0, 0.0, 4.0)
84
+ 0.0, 4.0, 0.0, 0.0,
85
+ 0.0, 0.0, 4.0, 0.0,
86
+ 0.0, 0.0, 0.0, 4.0)
87
87
  r = p*4.0
88
88
  assert_instance_of(FXMat4f, r)
89
89
  # assert_equal(q, r)
@@ -48,7 +48,7 @@ class TC_FXMaterial < Test::Unit::TestCase
48
48
  assert_in_delta(0.7, @mat.emission[2], DELTA)
49
49
  assert_in_delta(0.8, @mat.emission[3], DELTA)
50
50
 
51
- @mat.emission = FXHVec.new(0.5, 0.6, 0.7, 0.8)
51
+ @mat.emission = FXVec4f.new(0.5, 0.6, 0.7, 0.8)
52
52
  assert_in_delta(0.5, @mat.emission[0], DELTA)
53
53
  assert_in_delta(0.6, @mat.emission[1], DELTA)
54
54
  assert_in_delta(0.7, @mat.emission[2], DELTA)
@@ -12,7 +12,6 @@ class TC_FXMenuCheck < Fox::TestCase
12
12
 
13
13
  def test_setCheck_TRUE
14
14
  @menuCheck.check = Fox::TRUE
15
- assert_equal(true, @menuCheck.check)
16
15
  assert_equal(Fox::TRUE, @menuCheck.checkState)
17
16
  assert(@menuCheck.checked?)
18
17
  assert(!@menuCheck.unchecked?)
@@ -21,7 +20,6 @@ class TC_FXMenuCheck < Fox::TestCase
21
20
 
22
21
  def test_setCheck_FALSE
23
22
  @menuCheck.check = Fox::FALSE
24
- assert_equal(false, @menuCheck.check)
25
23
  assert_equal(Fox::FALSE, @menuCheck.checkState)
26
24
  assert(!@menuCheck.checked?)
27
25
  assert(@menuCheck.unchecked?)
@@ -30,7 +28,6 @@ class TC_FXMenuCheck < Fox::TestCase
30
28
 
31
29
  def test_setCheck_MAYBE
32
30
  @menuCheck.check = Fox::MAYBE
33
- assert_equal(true, @menuCheck.check) # this is not a typo!
34
31
  assert_equal(Fox::MAYBE, @menuCheck.checkState)
35
32
  assert(!@menuCheck.checked?)
36
33
  assert(!@menuCheck.unchecked?)
@@ -39,7 +36,6 @@ class TC_FXMenuCheck < Fox::TestCase
39
36
 
40
37
  def test_setCheck_true
41
38
  @menuCheck.check = true
42
- assert_equal(true, @menuCheck.check)
43
39
  assert_equal(Fox::TRUE, @menuCheck.checkState)
44
40
  assert(@menuCheck.checked?)
45
41
  assert(!@menuCheck.unchecked?)
@@ -48,7 +44,6 @@ class TC_FXMenuCheck < Fox::TestCase
48
44
 
49
45
  def test_setCheck_false
50
46
  @menuCheck.check = false
51
- assert_equal(false, @menuCheck.check)
52
47
  assert_equal(Fox::FALSE, @menuCheck.checkState)
53
48
  assert(!@menuCheck.checked?)
54
49
  assert(@menuCheck.unchecked?)
@@ -12,7 +12,6 @@ class TC_FXMenuRadio < Fox::TestCase
12
12
 
13
13
  def test_setCheck_TRUE
14
14
  @menuRadio.check = Fox::TRUE
15
- assert_equal(true, @menuRadio.check)
16
15
  assert_equal(Fox::TRUE, @menuRadio.checkState)
17
16
  assert(@menuRadio.checked?)
18
17
  assert(!@menuRadio.unchecked?)
@@ -21,7 +20,6 @@ class TC_FXMenuRadio < Fox::TestCase
21
20
 
22
21
  def test_setCheck_FALSE
23
22
  @menuRadio.check = Fox::FALSE
24
- assert_equal(false, @menuRadio.check)
25
23
  assert_equal(Fox::FALSE, @menuRadio.checkState)
26
24
  assert(!@menuRadio.checked?)
27
25
  assert(@menuRadio.unchecked?)
@@ -30,7 +28,6 @@ class TC_FXMenuRadio < Fox::TestCase
30
28
 
31
29
  def test_setCheck_MAYBE
32
30
  @menuRadio.check = Fox::MAYBE
33
- assert_equal(true, @menuRadio.check) # this is not a typo!
34
31
  assert_equal(Fox::MAYBE, @menuRadio.checkState)
35
32
  assert(!@menuRadio.checked?)
36
33
  assert(!@menuRadio.unchecked?)
@@ -39,7 +36,6 @@ class TC_FXMenuRadio < Fox::TestCase
39
36
 
40
37
  def test_setCheck_true
41
38
  @menuRadio.check = true
42
- assert_equal(true, @menuRadio.check)
43
39
  assert_equal(Fox::TRUE, @menuRadio.checkState)
44
40
  assert(@menuRadio.checked?)
45
41
  assert(!@menuRadio.unchecked?)
@@ -48,7 +44,6 @@ class TC_FXMenuRadio < Fox::TestCase
48
44
 
49
45
  def test_setCheck_false
50
46
  @menuRadio.check = false
51
- assert_equal(false, @menuRadio.check)
52
47
  assert_equal(Fox::FALSE, @menuRadio.checkState)
53
48
  assert(!@menuRadio.checked?)
54
49
  assert(@menuRadio.unchecked?)
data/test/TC_FXQuatf.rb CHANGED
@@ -9,23 +9,23 @@ class TC_FXQuatf < Test::Unit::TestCase
9
9
  end
10
10
 
11
11
  def test_default_constructor
12
- q = FXQuatf.new
12
+ FXQuatf.new
13
13
  end
14
14
 
15
15
  def test_construct_from_axis_and_angle
16
16
  axis = FXVec3f.new(1.0, 1.0, 1.0)
17
- q = FXQuatf.new(axis)
18
- q = FXQuatf.new(axis, 0.0)
17
+ FXQuatf.new(axis)
18
+ FXQuatf.new(axis, 0.0)
19
19
  end
20
20
 
21
21
  def test_construct_from_components
22
22
  x, y, z, w = 1.0, 1.0, 1.0, 1.0
23
- q = FXQuatf.new(x, y, z, w)
23
+ FXQuatf.new(x, y, z, w)
24
24
  end
25
25
 
26
26
  def test_construct_from_roll_pitch_yaw
27
27
  roll, pitch, yaw = 45.0, 45.0, 45.0
28
- q = FXQuatf.new(roll, pitch, yaw)
28
+ FXQuatf.new(roll, pitch, yaw)
29
29
  end
30
30
 
31
31
  def test_adjust!
@@ -12,7 +12,6 @@ class TC_FXRadioButton < Fox::TestCase
12
12
 
13
13
  def test_setCheck_TRUE
14
14
  @radioButton.check = Fox::TRUE
15
- assert_equal(true, @radioButton.check)
16
15
  assert_equal(Fox::TRUE, @radioButton.checkState)
17
16
  assert(@radioButton.checked?)
18
17
  assert(!@radioButton.unchecked?)
@@ -21,7 +20,6 @@ class TC_FXRadioButton < Fox::TestCase
21
20
 
22
21
  def test_setCheck_FALSE
23
22
  @radioButton.check = Fox::FALSE
24
- assert_equal(false, @radioButton.check)
25
23
  assert_equal(Fox::FALSE, @radioButton.checkState)
26
24
  assert(!@radioButton.checked?)
27
25
  assert(@radioButton.unchecked?)
@@ -30,7 +28,6 @@ class TC_FXRadioButton < Fox::TestCase
30
28
 
31
29
  def test_setCheck_MAYBE
32
30
  @radioButton.check = Fox::MAYBE
33
- assert_equal(true, @radioButton.check) # this is not a typo!
34
31
  assert_equal(Fox::MAYBE, @radioButton.checkState)
35
32
  assert(!@radioButton.checked?)
36
33
  assert(!@radioButton.unchecked?)
@@ -39,7 +36,6 @@ class TC_FXRadioButton < Fox::TestCase
39
36
 
40
37
  def test_setCheck_true
41
38
  @radioButton.check = true
42
- assert_equal(true, @radioButton.check)
43
39
  assert_equal(Fox::TRUE, @radioButton.checkState)
44
40
  assert(@radioButton.checked?)
45
41
  assert(!@radioButton.unchecked?)
@@ -48,7 +44,6 @@ class TC_FXRadioButton < Fox::TestCase
48
44
 
49
45
  def test_setCheck_false
50
46
  @radioButton.check = false
51
- assert_equal(false, @radioButton.check)
52
47
  assert_equal(Fox::FALSE, @radioButton.checkState)
53
48
  assert(!@radioButton.checked?)
54
49
  assert(@radioButton.unchecked?)
data/test/TC_FXRegion.rb CHANGED
@@ -17,9 +17,9 @@ class TC_FXRegion < Test::Unit::TestCase
17
17
  FXPoint.new(100, 100),
18
18
  FXPoint.new(0, 0)
19
19
  ]
20
- r1 = FXRegion.new(points, true)
21
- r2 = FXRegion.new(points, false)
22
- r3 = FXRegion.new(points)
20
+ FXRegion.new(points, true)
21
+ FXRegion.new(points, false)
22
+ FXRegion.new(points)
23
23
  end
24
24
 
25
25
  def test_copy_constructor
data/test/TC_FXShell.rb CHANGED
@@ -22,6 +22,7 @@ class TC_FXShell < Test::Unit::TestCase
22
22
  def test_new
23
23
  # Free-floating
24
24
  shell1 = FXShell.new(@app, 0, 0, 0, 0, 0)
25
+ assert_nil(shell1.owner)
25
26
 
26
27
  # Owned
27
28
  shell2 = FXShell.new(@mainWin, 0, 0, 0, 0, 0)
data/test/TC_FXTable.rb CHANGED
@@ -76,7 +76,7 @@ private
76
76
  clearEdges(extending)
77
77
 
78
78
  old_nr = @table.numRows
79
- old_nc = @table.numColumns
79
+ _old_nc = @table.numColumns
80
80
 
81
81
  # resize the table
82
82
  nr = @data_lines.size + 2
data/test/TC_FXVec4f.rb CHANGED
@@ -39,7 +39,7 @@ class TC_FXVec4f < Test::Unit::TestCase
39
39
  end
40
40
 
41
41
  def test_new5
42
- c = FXVec4f.new(FXRGB(128, 128, 128))
42
+ FXVec4f.new(FXRGB(128, 128, 128))
43
43
  end
44
44
 
45
45
  def test_getitem
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fxruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.32
4
+ version: 1.6.33
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Lyle Johnson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-08-07 00:00:00.000000000 Z
12
+ date: 2015-08-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mini_portile