Re: What gives us the macro GSEAL()?



Colomban Wendling pisze:
Simply because access to window->title will not be possible any more,
as I explained in another mail.

----- another mail:
No, AFAIK, GSEAL_ENABLE is not meant to be put in any GTK+ header,
only to be added by hand to your programs' compiling options (e.g.
- -DGSEAL_ENABLE to a GCC's command line) in order to check your program
for compatibility with upcoming releases.
-----
so if your programs not define GSEAL_ENABLE you can not use for GTK+ 3.0 library, yes? (compiling program in GTK+ 3.0 without GSEAL_ENABLE is impossible - realy impossible?)

For now, if you define GSEAL_ENABLE when compiling an application
accessing window->title, it will fail since window->title doesn't
exist: it is renamed window->_g_sealed__title. But you have not to
know this other name, ...
of course ;)
All this is because the object can't be notified of a modification of
one of it's properties if it is not done by the GObject's mechanism,
or at least an object's function. And if an object is not notified of
a change, it can't do the work it should do when this change happen,
e.g. for the window's title example, update the window's titlebar.
And using only GObject's property mechanism allows a lot of nice
features like use of the notify::property-name signal and so on.
void
gtk_window_set_title (GtkWindow   *window,
             const gchar *title)
{
 ...
 window->title = new_title;
 ...
 g_object_notify (G_OBJECT (window), "title");  // it you mean :)
}

----- another mail:

Explaining the meaning of GTK's structure members is not a good idea
IMO since they may are going to change and perhaps become opaque. The
right way to access object's properties is to use accessors, and that
will become the only way.

unless you are right, but this is not change this that I must be know
(and I want) know what is going in GTK+ sources
I think about this...

I don't really understand what you mean here, sorry :/

-----
this is my fault - sorry

I wanted say that you are right: "Explaining the meaning of GTK's structure members is not a good idea"

Thanks all for answer.

---
Grzegorz Kuczyński





----------------------------------------------------------------------
Oblej swoich znajomych... wirtualnie! ;)
http://link.interia.pl/f2119



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