Re: [gnome-love] Clueless when facing GObject



Yaron Tausky <decaycell gmail com> writes:

I wish to write a GNOME IM client -- mainly as a project for myself, I
doubt if would be interested in my code -- yet I'm not quite sure about
the architecture. GObject seems VERY complicated, and I couldn't find
any tutorial about it beside the included documentation. Should I
structure the programme as collection of classes (as in C++) and
implement each and every one of them as a GObject? Should I do it only
for key classes, and do the rest (helpers, etc.) in the old fashion C
style?

I wouldn't bother with GObject at all. A simple struct with functions
as methods is generally fine:

typedef struct MyClass MyClass;
struct MyClass
{
        ...;
};

MyClass *my_class_new (...);
int      my_class_ref (MyClass *obj);
void     my_class_unref (MyClass *obj);
void my_class_whatever (MyClass *obj, ...);
...;


Also, I wondered if there's a platform library for handling of
networking. I know Evolution uses libsoup, but I don't think it's a part
of the platform.

Well, I wrote one:   http://www.daimi.au.dk/~sandmann/lac-0.5.tar.gz
but I havent really done anything with it for a long time. I does work
though, and I think it's a fundamentally sane API. If you have
questions about it, feel free to ask.

This library is obviously not part of the platform either.


Søren



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]