Displaying 8 results from an estimated 8 matches for "swig_rubyremovetrack".
2007 Jul 21
0
[1135] trunk/wxruby2/swig/mark_free_impl.i: Convert from DOS to Unix newlines
...d_sym = rb_intern("@__wx_destroyed__");
-
-// Code to be run when the ruby object is swept by GC - this only
-// unlinks the C++ object from the ruby VALUE but doesn''t delete
-// it because it is still needed and will be managed by WxWidgets.
-void GcNullFreeFunc(void *ptr)
-{
- SWIG_RubyRemoveTracking(ptr);
-}
-
-// Tests if the window has been signalled as destroyed by a
-// WindowDestroyEvent handled by wxRubyApp
-bool GC_IsWindowDeleted(void *ptr)
-{
- // If objects have been ''unlinked'' then DATA_PTR = 0
- if ( ! ptr ) return true;
- VALUE rb_win = SWIG_RubyInstanceFor...
2007 Jul 22
0
[1140] trunk/wxruby2/swig/mark_free_impl.i: Remove instance variable marking of deleted Wx Windows because it''s redundant
...-         rb_ivar_set(rb_win, wx_destroyed_sym, Qtrue);
-         SWIG_RubyUnlinkObjects(ptr);
-         SWIG_RubyRemoveTracking(ptr);
-        }
</del><ins>+ SWIG_RubyUnlinkObjects(ptr);
+ SWIG_RubyRemoveTracking(ptr);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class=&qu...
2007 Jul 21
0
[1127] trunk/wxruby2: Move shared C++ GC functions into separate file included into wx.i
...d_sym = rb_intern("@__wx_destroyed__");
+
+// Code to be run when the ruby object is swept by GC - this only
+// unlinks the C++ object from the ruby VALUE but doesn''t delete
+// it because it is still needed and will be managed by WxWidgets.
+void GcNullFreeFunc(void *ptr)
+{
+ SWIG_RubyRemoveTracking(ptr);
+}
+
+// Tests if the window has been signalled as destroyed by a
+// WindowDestroyEvent handled by wxRubyApp
+bool GC_IsWindowDeleted(void *ptr)
+{
+ VALUE rb_win = SWIG_RubyInstanceFor(ptr);
+ if ( rb_ivar_defined(rb_win, wx_destroyed_sym ) )
+    &n...
2007 Mar 21
4
Problem with PaintDC(MSW)
When implementing EVT_PAINT handlers in c++ the PaintDC object is
constructed at the beginning of the function,
and auto destructed at it''s end, which informs wxwidgets that "invalid
regions in the window have been repainted".
Under ruby, this is not the case and causes a stream of EVT_PAINT events
to be sent to the given window (until one
of PaintDC objects is destructed by
2007 Apr 13
0
[959] branches/wxruby2/wxwidgets_282/swig/wx.i: Ensure GC_NEVER handler at least unlinks objects; update to new API for
...quot;cx"> }
</span><span class="cx">
</span><del>-void GcFreefunc(void *)
</del><ins>+void GcFreefunc(void *ptr)
</ins><span class="cx"> {
</span><del>-
</del><ins>+ SWIG_RubyUnlinkObjects(ptr);
+ SWIG_RubyRemoveTracking(ptr);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ///////////////////////////////////////////////////
</span><span class="lines">@@ -74,7 +75,7 @@
</span><span class=...
2007 Jul 21
0
[1134] trunk/wxruby2/swig/mark_free_impl.i: When window is deleted, unhook ruby obj from DATA_PTR to avoid MSW crashes
...nbsp      rb_ivar_set(rb_win, wx_destroyed_sym, Qtrue);
</span><ins>+         SWIG_RubyUnlinkObjects(ptr);
+         SWIG_RubyRemoveTracking(ptr);
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -92,8 +96,6 @@
</s...
2007 May 22
0
[1032] trunk/wxruby2/swig: Preserve Sizers associated with Windows from GC; fix several sample
...+++ trunk/wxruby2/swig/wx.i        2007-05-22 21:40:09 UTC (rev 1032)
</span><span class="lines">@@ -22,6 +22,37 @@
</span><span class="cx"> {
</span><span class="cx"> SWIG_RubyRemoveTracking(ptr);
</span><span class="cx"> }
</span><ins>+
+static VALUE wx_destroyed_sym = rb_intern("@__wx_destroyed__");
+bool GC_IsWindowDeleted(void *ptr)
+{
+ VALUE rb_win = SWIG_RubyInstanceFor(ptr);
+ return ( rb_ivar_defined(rb_win, wx_destroyed_sym ) =...
2007 May 21
0
[1024] trunk/wxruby2/swig: Memory mgmt: defs and implementation of new memory management; strip
...ted(void *ptr)
-{
- DeletedHash[ptr] = true;
-}
-
-bool GcIsDeleted(void *ptr)
-{
- if (DeletedHash.find(ptr) == DeletedHash.end())
- return false;
- else return true;
-}
-
-void GcFreefunc(void *ptr)
-{
- SWIG_RubyUnlinkObjects(ptr);
</del><span class="cx"> SWIG_RubyRemoveTracking(ptr);
</span><span class="cx"> }
</span><del>-
-///////////////////////////////////////////////////
-extern "C" void Init_wxRubyEventTypes();
-
</del><span class="cx"> %}
</span><span class="cx">
</span&...