[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bindings
Subject: Re: [Kde-bindings] Qyoto: SIGNALS/SLOTS
From: Richard Dale <Richard_Dale () tipitina ! demon ! co ! uk>
Date: 2005-12-30 10:18:53
Message-ID: 200512301105.20812.Richard_Dale () tipitina ! demon ! co ! uk
[Download RAW message or body]
On Thursday 29 December 2005 23:19, Arno Rehn wrote:
> > A QString return value would be marshalled to a C# string, which would be
> > in a GCHandle in the 's_class' field of the C# array of SmokeItems.
> > Similary Qt instances like QWidget need to end up as GCHandles in the
> > 's_class' field. Primitive types are held directly in 's_int' or whatever
> > in the SmokeItem. The only difference between the C++ array of
> > SmokeItems, and the one built up in C# in SmokeInvocation.cs, is that
> > non-primitive types are held as GCHandles, rather than as C++ pointers.
>
> By the way, how do we get the other types like a string out of the struct
> in C++, when we call a method in C# like 'SetText' ? The GCHandle of the
> string is stored in s_intptr in the C#-struct, but there is no equivalent
> for this in the C++-struct. How can we access it in C++ then ?
Have a look at the code the marshall_basetype() function in qt3handlers.cpp:
smokeqyoto_object *o = value_obj_info(m->var().s_class);
value_obj_info() in qt3qyoto.cpp obtains the smokeqyoto_object for the C#
instance with a callback, and then the C++ instance is 'o->ptr'.
smokeqyoto_object *value_obj_info(void * qyoto_value) {
smokeqyoto_object * o = (smokeqyoto_object*) (*GetSmokeObject)
(qyoto_value);
return o;
}
-- Richard
_______________________________________________
Kde-bindings mailing list
Kde-bindings@kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic