search for: directorin

Displaying 8 results from an estimated 8 matches for "directorin".

Did you mean: directorio
2005 Oct 09
0
[Fwd: Re: [Swig] Re: Object return problem]
...> >> /** >> %typemap(freearg) wxString & { >> delete $1; >> } >> >> %typemap(freearg) const wxString& { >> delete $1; >> } >> >> %typemap(freearg) wxString* { >> delete $1; >> } >> */ >> %typemap(directorin) wxString, const wxString &, wxString & "$input = >> rb_str_new2((const char *)$1.mb_str());"; >> >> %typemap(directorin) wxString *, const wxString * "TODO: >> $1_name->mb_str()"; >>...
2008 Jan 17
1
wxSockets
Hello guys, Alright Alex..... I need a few tips on where to start. I know that I''m going to need to rewrite the wxSocket header files, in order to incorperate them into wxRuby. But some advice on stuff such as wxSocketClient::new/connect, where it takes a wxIPAddress, and so forth. I know they are pretty friviolous structures for holding information about Addresses in which to make
2005 Oct 06
9
Grid.GetTextExtent
Wow. Look what SWIG does to GetTextExtent in Grid.cpp: void SwigDirector_wxGrid::GetTextExtent(wxString const &string, int *x, int *y, int *descent, int *externalLeading, wxFont const *font) const { ... if (swig_get_up()) { wxWindow::GetTextExtent(string,x,y,descent,externalLeading,font); return; } obj0 = rb_str_new2((const char *)(&string)->mb_str());
2006 Dec 30
1
wxTreeItemId
...fix this. I''m wondering if it''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...
2007 Mar 17
0
[888] branches/wxruby2/wxwidgets_282/swig/shared/treeitemid_typemaps.i: Fix compile warning for TreeItemId typemap (Artur Kuptel)
...ot; </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><ins>+%typemap(directorout) wxTreeItemId& "$result = new wxTreeItemId((void*)NUM2LO...
2007 Jun 25
0
[1069] trunk/wxruby2/swig/typemap.i: Fix big memory leak in methods taking wxString as a parameter
...in the input typemap for now. +%typemap(freearg) wxString & "if ( argc > $argnum - 2 ) delete $1;" +%typemap(freearg) wxString* "if ( argc > $argnum - 2 ) delete $1;" </ins><span class="cx"> </span><span class="cx"> %typemap(directorin) wxString, const wxString &, wxString & "$input = rb_str_new2((const char *)$1.mb_str());"; </span><span class="cx"> </span></span></pre> </div> </div> </body> </html>
2007 Jan 05
0
[831] trunk/wxruby2: Use simple ruby Integers to represent TreeItemIds
...lt;/span><ins>+// These typemaps are used by TreeCtrl and TreeEvent to convert wx tree +// item ids into simple + +%typemap(in) wxTreeItemId& "$1 = new wxTreeItemId(NUM2LONG($input));" +%typemap(out) wxTreeItemId "$result = LONG2NUM( (long)$1.m_pItem );" +%typemap(directorin) wxTreeItemId& "$input = LONG2NUM( (long)$1.m_pItem );" +%typemap(directorout) wxTreeItemId& "$result = new wxTreeItemId(NUM2LONG($1));" +%typemap(freearg) wxTreeItemId& "delete $1;" + + </ins></span></pre> </div> </div> </...
2006 Nov 16
0
[741] trunk/wxruby2: Fix get_item_data, hiding TreeItemData messiness, fix GC-ing (Alex Fenton)
...bject(VALUE obj) { +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp m_obj = obj; + } + + VALUE m_obj; +}; +%} + + +// typemaps for setting and getting ruby objects as itemdata. +%typemap(in) wxTreeItemData* "$1 = new wxRbTreeItemData($input);" + +%typemap(directorin) wxTreeItemData* { + wxRbTreeItemData* ruby_item_data = (wxRbTreeItemData *)$1; + $input = ruby_item_data->GetRubyObject(); +} + +%typemap(out) wxTreeItemData* { + if ( $1 == NULL ) +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp{ +&nbsp&nbsp&nbsp&nbs...