Re: Independent image loaders in gdk-pixbuf

On Sat, 2002-09-28 at 19:33, Havoc Pennington wrote:
> Matthias Clasen <maclas gmx de> writes: 
> > I tried your struct approach instead, and settled on the following
> > 
> > typedef struct _GdkPixbufFormatInfo GdkPixbufFormatInfo;
> > struct _GdkPixbufFormatInfo {
> >   gchar *name;
> >   gchar *description;
> >   gchar **mime_types;
> >   gchar **extensions;
> >   gboolean is_writable;
> > };
> >  
> This should really be opaque, it seems likely we'd want to add fields.

You mean like this ?

typedef struct _GdkPixbufFormat GdkPixbufFormat;
GSList    *gdk_pixbuf_get_formats (void);
gchar     *gdk_pixbuf_format_get_name        (GdkPixbufFormat *format);
gchar     *gdk_pixbuf_format_get_description (GdkPixbufFormat *format);
gchar    **gdk_pixbuf_format_get_mime_types  (GdkPixbufFormat *format);
gchar    **gdk_pixbuf_format_get_extensions  (GdkPixbufFormat *format);
gboolean   gdk_pixbuf_format_is_writable     (GdkPixbufFormat *format);
void       gdk_pixbuf_format_free            (GdkPixbufFormat *format);

Ok. This is in the latest patch.
> Or we could allow some dlopen and some hardcoded modules, so we only
> have to dlopen the librsvg FormatInfo thing, while FormatInfo is
> built-in for most formats.

That might be a good compromise.	


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