[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Denemo-devel] Transpose
From: |
Jeremiah Benham |
Subject: |
Re: [Denemo-devel] Transpose |
Date: |
Tue, 12 Aug 2008 10:49:42 -0500 |
On Tue, 2008-08-12 at 11:35 +0100, Richard Shann wrote:
> On Mon, 2008-08-11 at 22:52 -0500, Jeremiah Benham wrote:
> > So in this instance the alias
> I am not sure what you mean by alias here
I was confused with what you were doing. I thought:
arraytype;
> arraytype interface_array[] = {
> {"Denemo_InsertBflatmaj",(void*) 0x816ac40},
was creating a alias called Denemo_InsertBflatmaj that really pointed to
(void*) 0x816ac40. This (void*) 0x816ac40 was really just a pointer to a
different function correct? I think this confused me.
> > would point to a GValue containing what?
> > the function name and its arguments?
> >
> > > GValue *value = g_malloc0(sizeof(GValue));
> > > g_value_init(value, G_TYPE_BOOLEAN);
> > > g_value_set_boolean(value,Denemo.gui->textview &&
> > > GTK_WIDGET_VISIBLE(Denemo.gui->textwindow));
> > > g_object_set_property (G_OBJECT (widget), "active", value);
> > >
> > > though you wouldn't normally generate them on the heap.
> The Swig tutorial you pointed me to only had examples with parameters
> that were standard C types,
No. I believe you can define your own structures and pass them to the
interface file. I think they have to be defined in the interface file or
defined in an included header. Page 69-74 on this old tutorial from
1998:
http://www.swig.org/papers/PyTutorial98/PyTutorial98.pdf
shows a structure defined in the .i file like this
typedef struct {
double x,y,z;
} Vector;
I will have to play around with it. The memory will have to be freed
somehow.
> and indeed to invoke a function with some
> other type from the language would require some way of expressing the
> value of a custom type in the scripting language.
I believe that can be done.
Jeremiah
> I guess this is not
> available, but I am sure that once we have a basic (parameter-less)
> setup established we can devise something to read out modify and write
> back the values of things in Denemo. At which point this GValue stuff
> might be handy for checking that the type of the parameters is what was
> required by the called function.
> Richard
>
>
>
>
> _______________________________________________
> Denemo-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/denemo-devel
- Re: [Denemo-devel] Transpose, (continued)
- Re: [Denemo-devel] Transpose, Richard Shann, 2008/08/11
- Re: [Denemo-devel] Transpose, Jeremiah Benham, 2008/08/11
- Re: [Denemo-devel] Transpose, Jeremiah Benham, 2008/08/12
- Re: [Denemo-devel] Transpose, Richard Shann, 2008/08/12
- Re: [Denemo-devel] Transpose, Jeremiah Benham, 2008/08/12
- Re: [Denemo-devel] Transpose, Richard Shann, 2008/08/12
- Re: [Denemo-devel] Transpose, Jeremiah Benham, 2008/08/12
- Re: [Denemo-devel] Transpose, Richard Shann, 2008/08/12
- Re: [Denemo-devel] Transpose, Jeremiah Benham, 2008/08/13
- Re: [Denemo-devel] Transpose, Richard Shann, 2008/08/12
- Re: [Denemo-devel] Transpose,
Jeremiah Benham <=
- Re: [Denemo-devel] Transpose, Richard Shann, 2008/08/13
Re: [Denemo-devel] Transpose, Richard Shann, 2008/08/13