#ifndef __GDAM_SKIN_FACTORY_H_
#define __GDAM_SKIN_FACTORY_H_

typedef struct _GdamSkinFactory GdamSkinFactory;
typedef struct _GdamSkinFactoryClass GdamSkinFactoryClass;

#include "gdamskin.h"

GtkType gdam_skin_factory_get_type();
#define GDAM_TYPE_SKIN_FACTORY			(gdam_skin_factory_get_type ())
#define GDAM_SKIN_FACTORY(obj)              (GTK_CHECK_CAST ((obj), GDAM_TYPE_SKIN_FACTORY, GdamSkinFactory))
#define GDAM_SKIN_FACTORY_CLASS(klass)      (GTK_CHECK_CLASS_CAST ((klass), GDAM_TYPE_SKIN_FACTORY, GdamSkinFactoryClass))
#define GDAM_IS_SKIN_FACTORY(obj)           (GTK_CHECK_TYPE ((obj), GDAM_TYPE_SKIN_FACTORY))
#define GDAM_IS_SKIN_FACTORY_CLASS(klass)   (GTK_CHECK_CLASS_TYPE ((klass), GDAM_TYPE_SKIN_FACTORY))


struct _GdamSkinFactoryClass {
	GtkObjectClass		object_class;
};

struct _GdamSkinFactory {
	GtkObject		object;

	/* Map from GdamModel type-names to GdamSkinFactoryProducts. */
	GHashTable*		model_types;
};

typedef GdamSkin*   (*GdamSkinFactoryFunc)(GdamModel*        model,
                                           gpointer          builder_data);

GdamSkinFactory* gdam_skin_factory_new();
GdamSkin*   gdam_skin_factory_skin      (GdamSkinFactory*    skin_factory,
                                         GdamModel*          model);
void        gdam_skin_factory_add_method(GdamSkinFactory*    skin_factory,
					 const char*         model_type_name,
                                         GdamSkinFactoryFunc builder,
					 gpointer            builder_data);

#endif
