/*
    GDAM - Geoff & Dave's Audio Mixer
    Copyright (C) 1999    Dave Benson, Geoff Matters.

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA

    Contact:
        daveb@ffem.org <Dave Benson>
        geoff@ugcs.caltech.edu <Geoff Matters>
*/
#ifndef __GDAM_PACKER_H
#define __GDAM_PACKER_H

#include <pthread.h>
#include <gdam/component/gdaminfomanager.h>
#include <gdam/component/gdamtoplevel.h>
#include <gdam/client/gdamchannel.h>

typedef struct _GdamPacker GdamPacker;
typedef struct _GdamPackerClass GdamPackerClass;

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

#include "gdamskin.h"

GtkType gdam_packer_get_type();
#define GDAM_TYPE_PACKER			(gdam_packer_get_type ())
#define GDAM_PACKER(obj)              (GTK_CHECK_CAST ((obj), GDAM_TYPE_PACKER, GdamPacker))
#define GDAM_PACKER_CLASS(klass)      (GTK_CHECK_CLASS_CAST ((klass), GDAM_TYPE_PACKER, GdamPackerClass))
#define GDAM_IS_PACKER(obj)           (GTK_CHECK_TYPE ((obj), GDAM_TYPE_PACKER))
#define GDAM_IS_PACKER_CLASS(klass)   (GTK_CHECK_CLASS_TYPE ((klass), GDAM_TYPE_PACKER))

struct _GdamPackerClass {
	GdamSkinClass		skin_class;
};

GdamSkinClass*     gdam_packer_class();

struct _GdamPacker {
	GdamSkin		skin;

	guint			mix_id;

	/* Component to use as parent of subskins. */
	GdamToplevel* 		toplevel;

	/* Widget we trap for keystrokes (if had_keyboard_handler, at least) */
	GtkWidget*              key_widget;

	GHashTable*		named_skins;

	/* Whether we need to trap the key press/release events. */
	gboolean 		had_keyboard_handler;
};


GdamModel*     gdam_packer_get_model           (GdamPacker*         packer,
                                                const char*         name);
GdamSkin*      gdam_packer_get_skin            (GdamPacker*         packer,
			                        const char*         name);

/* If the `register_connect_method' stuff goes through... */
#if 0
void           gdam_packer_do_attach           (GdamPacker*         packer,
                                                const char*         command,
						const char*         name_a,
						const char*         name_b);
						/* Extension: add ... ? */
#endif



#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif
