Re: [gdome]gdome2-0.6.6 is released
- From: Paolo Casarini <casarini CS UniBO IT>
- To: rob <mailingLists pangolin org uk>
- Cc: gdome <gdome gnome org>
- Subject: Re: [gdome]gdome2-0.6.6 is released
- Date: Wed, 16 May 2001 18:29:12 +0200 (CEST)
On 16 May 2001, rob wrote:
> On 13 May 2001 19:34:51 +0200, Paolo Casarini wrote:
> >
> > This is a preview/test release before the 0.7.0, it's important to
> > test events modules before announcing it. So, let's play with events.
>
> how do I get the priv thingy back from the event listener?
>
> GdomeEventListener* gdome_evntl_mkref (void (*callback)
> (GdomeEventListener *self,GdomeEvent *event,GdomeException *exc),
> void *priv);
>
> or am I misunderstanding it. It is like the user_data gpointer with gtk
> signals ?
the priv field exists only for compatibility with applications that works
with Gdome1 (only Gill). The right way to link user_data to a Gdome2
object is with the public GdomePrivateList field called "private". All
Core objects already have this public field. I'll add this to events
modules objects with the next release.
> And would it be clearer to call the creation functions _new, rather than
> _mkref i.e gdome_evntl_new rather than gdome_evntl_mkref as this is what
> gtk does ?
Gtk and Gdome2 object model are different, Gdome2 one is more simple and
in some way lighter.
Gdome2 have a reference counting system to works with objects so
it's right to think to objects as references to allocated structure.
To answer to your question the _new suffix is wrong because when we call a
_mkref API, Gdome2 doesn't always allocate a new object. Infact if the
istance of the object which we want a reference is already allocated a
call to the _mkref API only increments the reference counting associated
with it. Only if the object doesn't exist, Gdome2 allocates a new one.
However the right way, for a DOM user, to create a new Event Object is
through the DocumentEvent Interface (implemented in the Document one).
Then, if we want to create a MutationEvents we have write something like
the following:
GdomeMutationEvent *mev;
GdomeDOMString *eventType;
GdomeException exc;
gdome_str_mkref ("MutationEvents");
gdome_doc_create (doc, eventType, &exc);
The 0.6.6 release create only MutationEvents, the next one will create
also generic Events.
However, I think, it's not very usual that people creates its own
MutationEvents: Gdome2 does it for you. I think you have only to catch
then.
Thanx
Paolo
--
Paolo Casarini - casarini cs unibo it
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]