Quote:
Originally Posted by ericshliao
You are right. I just can't understand why.
|
For inspiration look in lgob-9.09/gdk/src/gdk.def:
Code:
defFunction('gdk_color_parse',
{
since = '0.1',
args = {'char* none', 'struct* full'},
ret = 'boolean none'
}
)
This generates: lgob-9.09/gdk/src/iface.c where you can see that color_parse has a string as input and a color as output:
Code:
static int _wrap_gdk_color_parse(lua_State* L)
{
GdkColor color;
gdk_color_parse(lua_tostring(L, 1), &color);
boxed_new(L, GDK_TYPE_COLOR, &color);
return 1;
}
It takes some time to get used to this, but after a while it becomes quite readable. For me it is easier to parse than those Chinese glyphs ;-)
PS: shall we start a new thread for lgob discussions to avoid 'polluting' the software release threads?