Re: What gives us the macro GSEAL()?
- From: Colomban Wendling <ban-ubuntu club-internet fr>
- To: gtk-devel-list gnome org
- Subject: Re: What gives us the macro GSEAL()?
- Date: Mon, 13 Apr 2009 19:07:44 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Grzegorz Kuczyński a écrit :
> 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?)
No, it is not what I would mean.
But yes, if your program doesn't compile with GSEAL_ENABLE, it
wouldn't compile better with GTK+ 3.0 without GSEAL_ENABLE. See, if
your program doesn't compile with -DGSEAL_ENABLE,
- -DGTK_DISABLE_DEPRECATED and so on, you know you don't use the API as
you should now; then you should fix your program to pass theses tests.
See GSEAL as a way to deprecate use of a member, then if your program
doesn't compile if deprecated symbols are removed from the library, it
is obvious that it could not compile any more in future releases of
the library.
>> 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 :) }
Exactly.
Regards,
Colomban
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAknjcWAACgkQyqbACDEjVWjUfwCgr3dKxYQsJvSlFQIXsVQXf/IZ
eNYAn25iboN12SKmvLgYZb89nlR3TXDW
=bEIp
-----END PGP SIGNATURE-----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]