pixmap handling changes

From: Philip Blundell <philb.a.t.gnu.org>
Date: Sun Dec 22 2002 - 11:40:44 EST

This afternoon I made some changes to the way libgpewidget handles
pixmap loading. I hope this will make it easier to create robust
applications, and avoid the problems with random aborts/segfaults that
have plagued us in the past.

The significant differences are:

 - gpe_find_icon no longer performs lazy loading of icons: its function
is purely to look up an entry in the cache and return it. This function
will never return NULL: if you ask for an icon that has not been loaded,
your program will be terminated with an error. Checking the return
value for non-NULL is now unnecessary and such tests can be removed.

 - gpe_load_icons can now be called more than once. Successive calls
are additive.

 - a new function, gpe_try_find_icon, is provided for use by library
code, or in other situations where missing icons are non-fatal. This
function has roughly the semantics of the old gpe_find_icon; it will
return an icon from the cache if it exists, otherwise attempt lazy
loading. If the icon cannot be loaded, it returns NULL along with an
error string.

All this stuff is in CVS now, and will be in libgpewidget 0.33.

p.
Received on Sun Dec 22 16:40:46 2002

This archive was generated by hypermail 2.1.8 : Tue May 04 2004 - 09:41:30 EDT