Re: GClosure questions
- From: Robert Nikander <nikander mindspring com>
- To: GTK app devel list <gtk-app-devel-list gnome org>
- Subject: Re: GClosure questions
- Date: Mon, 17 Dec 2001 12:23:02 -0500
Ok, I think I can answer #1 one for myself...
It is really a 'subclass' of GClosure to be used in C.
For cb you pass in your C function to call, and then you set the
marshal function to be one of the marhallers from gtkmarhal.h.
If you were writing a python callback, you would write your own struct
like
struct MyPyClosure {
GClosure gclosure;
PyObject * callable;
...
}
And then write your own marshal function to take the GValues and turn
them
into Python objects for arguments to the Python callable object.
On 2001.12.17 10:44 Robert Nikander wrote:
Hi,
I am trying to understand GClosures. I think I am getting most of it,
but can someone tell me or point me to some docs about...
1. What is the purpose of the _C_ Closure stuct and gcclosure_new,
etc? For example, when does the 'cb' in
closure = g_cclosure_new( cb, data, notify )
get called?
2. What is the 'meta marshal' function. I set it and it got called
just like a 'marshal' function.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]