search for: long2num

Displaying 6 results from an estimated 6 matches for "long2num".

2007 Jan 05
0
[831] trunk/wxruby2: Use simple ruby Integers to represent TreeItemIds
...p;nbsprb_ary_push(array,ret_item_ruby);&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp </del><ins>+ +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsprb_ary_push(array,LONG2NUM((long)ret_item.m_pItem)); </ins><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsprb_ary_push(array,LONG2NUM((long)cookie)); </span><span class="cx&qu...
2006 Dec 30
1
wxTreeItemId
...#39;s easier to do away with the wxTreeItemId class, and just use typemaps to convert these to ruby Integers (as in 0.6.0). The following seems to work for me: %typemap(in) wxTreeItemId& "$1 = new wxTreeItemId(NUM2INT($input));" %typemap(directorin) wxTreeItemId& "$input = LONG2NUM( (long)$1.m_pItem );" %typemap(out) wxTreeItemId "$result = LONG2NUM( (long)$1.m_pItem );" I''m not sure the overhead of directors etc is needed for TreeItemId - the only method that wxTreeItemId offers over Integer is is_ok, which can be done with zero? Let me know if we...
2007 Mar 17
0
[888] branches/wxruby2/wxwidgets_282/swig/shared/treeitemid_typemaps.i: Fix compile warning for TreeItemId typemap (Artur Kuptel)
...<del>-%typemap(in) wxTreeItemId& "$1 = new wxTreeItemId(NUM2LONG($input));" </del><ins>+%typemap(in) wxTreeItemId& "$1 = new wxTreeItemId((void*)NUM2LONG($input));" </ins><span class="cx"> %typemap(out) wxTreeItemId "$result = LONG2NUM( (long)$1.m_pItem );" </span><span class="cx"> %typemap(directorin) wxTreeItemId& "$input = LONG2NUM( (long)$1.m_pItem );" </span><del>-%typemap(directorout) wxTreeItemId& "$result = new wxTreeItemId(NUM2LONG($1));" </del><...
2006 Apr 27
5
Major Breakthrough?
Attached are patches to make the textctrl.rb sample work fully. Note the new %directorargout typemap I added to fix wxWindows calling into SWIG. I don''t know if this can fix all such problems or not. Let me know what you think. I also rubified the sample a little bit more. Also, note that I fix the << operator so the function can be called. I hope I did this right. Roy
2007 Apr 29
0
[985] branches/wxruby2/wxwidgets_282/swig/classes/Window.i: Fix get_handle on GTK
...e = (long)GetXWindow(win); -#endif - -#ifdef __WXMAC__ - handle = (long)win->GetHandle(); -#endif - </del><ins>+ long handle = (long)win->GetHandle(); </ins><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspreturn LONG2NUM(handle); </span><span class="cx"> } </span><span class="cx"> } </span></span></pre> </div> </div> </body> </html>
2007 Apr 26
0
[973] branches/wxruby2/wxwidgets_282/swig/classes/Window.i: Fix crasher with Window#get_handle, also comment the paint method
..._WXMSW__ + handle = (long)win->GetHandle(); +#endif + +#if defined(__WXGTK__) || defined(__WXX11) + handle = (long)GetXWindow(win); +#endif + +#ifdef __WXMAC__ + handle = (long)win->GetHandle(); +#endif + +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspreturn LONG2NUM(handle); + } </ins><span class="cx"> } </span></span></pre> </div> </div> </body> </html>