search for: gc_iswindowdeleted

Displaying 10 results from an estimated 10 matches for "gc_iswindowdeleted".

2007 Jul 21
0
[1128] trunk/wxruby2/swig/common.i: Make GC_IsWindowDeleted function globally available
...rgin:10px 0;} #patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;} #patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;} #patch .lines, .info {color:#888;background:#fff;} --></style> <title>[1128] trunk/wxruby2/swig/common.i: Make GC_IsWindowDeleted function globally available</title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>1128</dd> <dt>Author</dt> <dd>brokentoy</dd> <dt>Date</dt> <dd>2007-07-21 07:57:51 -0400 (Sat, 21 J...
2007 Jul 21
0
[1135] trunk/wxruby2/swig/mark_free_impl.i: Convert from DOS to Unix newlines
...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(ptr); - if ( rb_ivar_defined(rb_win, wx_destroyed_sym ) ) -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspreturn true...
2007 Jul 21
0
[1127] trunk/wxruby2: Move shared C++ GC functions into separate file included into wx.i
...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 ) ) +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspreturn true; + else +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspreturn false; +} + +...
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
...sp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp2007-07-21 15:51:00 UTC (rev 1134) </span><span class="lines">@@ -22,6 +22,8 @@ </span><span class="cx"> // WindowDestroyEvent handled by wxRubyApp </span><span class="cx"> bool GC_IsWindowDeleted(void *ptr) </span><span class="cx"> { </span><ins>+ // If objects have been ''unlinked'' then DATA_PTR = 0 + if ( ! ptr ) return true; </ins><span class="cx"> VALUE rb_win = SWIG_RubyInstanceFor(ptr); </span><span...
2007 May 22
0
[1032] trunk/wxruby2/swig: Preserve Sizers associated with Windows from GC; fix several sample
...-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 ) == Qtrue ); +} + +// Default mark routine for Windows - preserve sizers +void GC_mark_wxWindow(void *ptr) +{ + + if ( GC_IsWindowDeleted(ptr) ) return; + + wxWindow* wx_win = (wxWindo...
2007 Jul 05
0
[1109] trunk/wxruby2/swig: Move marking of MenuBar from direct %markfunc to via mark_wxFrame, so
...;/span><span class="cx"> static VALUE wx_destroyed_sym = rb_intern("@__wx_destroyed__"); </span><ins>+ +// Tests if the window has been signalled as destroyed by a +// WindowDestroyEvent handled by wxRubyApp </ins><span class="cx"> bool GC_IsWindowDeleted(void *ptr) </span><span class="cx"> { </span><span class="cx"> VALUE rb_win = SWIG_RubyInstanceFor(ptr); </span><del>- return ( rb_ivar_defined(rb_win, wx_destroyed_sym ) == Qtrue ); </del><ins>+ return ( rb_ivar_defined(rb_win...
2007 Jul 22
0
[1141] trunk/wxruby2/swig/mark_free_impl.i: ControlWithItems call default Window mark routine to preserve ToolTips etc
...-07-22 23:08:52 UTC (rev 1140) +++ trunk/wxruby2/swig/mark_free_impl.i&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp2007-07-22 23:15:07 UTC (rev 1141) </span><span class="lines">@@ -130,6 +130,8 @@ </span><span class="cx"> if ( GC_IsWindowDeleted(ptr) ) </span><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspreturn; </span><span class="cx"> </span><ins>+ GC_mark_wxWindow(ptr); + </ins><span class="cx"> wxControlWithItem...
2007 Jul 21
0
[1137] trunk/wxruby2/swig/classes/TreeCtrl.i: Call correct shared function to check whether TreeCtrl is deleted in markfunc
...&nbsp&nbspVALUE rb_obj = SWIG_RubyInstanceFor(ptr); -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspif ( rb_iv_get(rb_obj, "@__wx_destroyed__" ) == Qtrue ) </del><ins>+&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspif ( GC_IsWindowDeleted(ptr) ) </ins><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return; </span><span class="cx"> </span><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&n...
2007 Jun 27
0
[1090] trunk/wxruby2/swig/wx.i: Fix a rare crasher if GC runs mid-way thru window creation via an evt_window_create handler
...class="cx"> void GC_mark_wxWindow(void *ptr) </span><span class="cx"> { </span><del>- </del><ins>+ // can occasionally be NULL if called in an evt_create handler + if ( ! ptr ) return; </ins><span class="cx"> if ( GC_IsWindowDeleted(ptr) ) return; </span><span class="cx"> </span><span class="cx"> wxWindow* wx_win = (wxWindow*)ptr; </span></span></pre> </div> </div> </body> </html>
2007 Jul 22
0
[1140] trunk/wxruby2/swig/mark_free_impl.i: Remove instance variable marking of deleted Wx Windows because it''s redundant
...nks the C++ object from the ruby VALUE but doesn''t delete </span><span class="cx"> // it because it is still needed and will be managed by WxWidgets. </span><span class="lines">@@ -23,9 +21,7 @@ </span><span class="cx"> bool GC_IsWindowDeleted(void *ptr) </span><span class="cx"> { </span><span class="cx"> // If objects have been ''unlinked'' then DATA_PTR = 0 </span><del>- if ( ! ptr ) return true; - VALUE rb_win = SWIG_RubyInstanceFor(ptr); - if ( rb_ivar_defin...