Displaying 7 results from an estimated 7 matches for "wxrbcallback".
Did you mean:
rbcallback
2007 Jun 23
0
[1063] trunk/wxruby2/swig/classes/EvtHandler.i: Add a public ''connect'' method for handling arbitary user-defined events
...nnect(int firstId, int lastId, wxEventType eventType)
+ {
+ VALUE func = rb_funcall(rb_cProc, rb_intern("new"), 0);
+ rb_global_variable(&callbacks);
+ if(callbacks == Qnil)
+ callbacks = rb_ary_new();
+ rb_ary_push(callbacks, func);
+
+ wxObject* userData = new wxRbCallback(func);
+ wxObjectEventFunction function =
+ (wxObjectEventFunction )&wxRbCallback::EventThunker;
+ self->Connect(firstId, lastId, eventType, function, userData);
+        return Qtrue;
+ }
+}
+
+
+%runtime{
+
<...
2007 May 31
0
[1042] trunk/wxruby2: Overhaul of the event handling WxType->RubyClass mapping to make it
...&wxEVT_SCI_START_DRAG,
- &wxEVT_SCI_DRAG_OVER,
- &wxEVT_SCI_DO_DROP,
- &wxEVT_SCI_ZOOM,
- &wxEVT_SCI_HOTSPOT_CLICK,
- &wxEVT_SCI_HOTSPOT_DCLICK,
- &wxEVT_SCI_CALLTIP_CLICK,
- (const wxEventType *)0
-};
-#endif
-
-//IMPLEMENT_ABSTRACT_CLASS(wxRbCallback, wxObject);
-
</del><ins>+// Class which stores the ruby proc associated with an event handler.
</ins><span class="cx"> class wxRbCallback : public wxObject
</span><span class="cx"> {
</span><del>-// DECLARE_ABSTRACT_CLASS(wxR...
2008 Feb 06
0
[ wxruby-Bugs-17827 ] Crash when closing Dialog in bigdemo.rb
...g_wrap ()
#17 0x000d80da in rb_eval_string_wrap ()
#18 0x000de178 in rb_thread_trap_eval ()
#19 0x000de7e6 in rb_thread_trap_eval ()
#20 0x000da18c in rb_eval_string_wrap ()
#21 0x000dad6a in rb_eval_string_wrap ()
#22 0x000db7ed in rb_respond_to ()
#23 0x000db8d6 in rb_funcall ()
#24 0x010ab236 in wxRbCallback::EventThunker () at string.h:690
#25 0x0139fbc3 in wxAppConsole::HandleEvent (this=0x3ad2d0, handler=0x833200, func={__pfn = 0x10ab18c <wxRbCallback::EventThunker(wxEvent&)>, __delta = 0}, event=@0xbfffdf24) at ../src/common/appbase.cpp:320
#26 0x0143ba6e in wxEvtHandler::ProcessEventIfMa...
2008 May 14
0
[ wxruby-Patches-20130 ] Event handling performance issues
...EvtHandler.event_class_for_type() on the ruby side every time a new event is generated. I modified it to directly access the Wx::EvtHandler::EVENT_TYPE_CLASS_MAP hash (and saving it in a global variable after the first lookup), leading to a great performance improvement.
Another minor change was in wxRbCallback::EventThunker, just to avoid repeated calls to rb_intern.
After these changes my benchmark script reported an average of 55264 events/second! About 40% increase upon the first mark, quite impressive performance boost with simple changes. :)
I''m still looking for a way to reach the '&...
2006 Jul 25
6
Wizards
Hi
Please find attached a set of patches and swig files to implement
Wizards for wxruby. Also a brief sample.
Quick q - the C declarations of evt_xxx_xxx methods and their attaching
to Ruby classes seems to be duplicated across Events.i and EvtHandler.i
- is one of these the right place to be adding them? or both?
Thanks
alex
_______________________________________________
2006 Nov 12
0
[ wxruby-Bugs-6632 ] Linux crash on NoteBook in bigdemo.rb
...n rb_call (klass=3084969020, recv=3063296600, mid=5217,
argc=1, argv=0xbf81c6e0, scope=1) at eval.c:6048
#33 0x0805ea27 in vafuncall (recv=3063296600, mid=5217, n=1, ar=0xbf81c754)
at eval.c:6125
#34 0x0805eb60 in rb_funcall (recv=3063296600, mid=5217, n=1) at eval.c:6142
#35 0xb76edcd8 in wxRbCallback::EventThunker (this=0x8215fa8,
event=@0xbf81cfa0) at src/EvtHandler.cpp:2108
#36 0xb7b5b9be in wxEvtHandler::ProcessEventIfMatches () from lib/wxruby2.so
#37 0xb7b5ba52 in wxEvtHandler::SearchDynamicEventTable () from lib/wxruby2.so
#38 0xb7b5c3e6 in wxEvtHandler::ProcessEvent () from lib/wxru...
2007 May 29
0
[1035] trunk/wxruby2/swig/classes/EvtHandler.i: Removed a heap of redundant stuff that''s been #if 0''d for a while
...lf, (void **) &cppSelf, SWIGTYPE_p_wxEvtHandler, 1);
-
- VALUE func = rb_funcall(rb_cProc, rb_intern("new"), 0);
- rb_global_variable(&callbacks);
- if(callbacks == Qnil)
- callbacks = rb_ary_new();
- rb_ary_push(callbacks, func);
-
- wxObject* userData = new wxRbCallback(func);
- wxObjectEventFunction function =
- (wxObjectEventFunction )&wxRbCallback::EventThunker;
- (cppSelf)->Connect(firstId, lastId, eventType, function, userData);
-}
-
-static VALUE internal_evt_with_id(int argc, VALUE *argv, VALUE self,
- wxEventType eventType)
-{...