/* OpenIDA - Outil d'analyse de fichiers binaires
 * panels.h - prototypes pour la gestion des différents panneaux
 *
 * Copyright (C) 2009-2010 Cyrille Bagard
 *
 *  This file is part of OpenIDA.
 *
 *  OpenIDA is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  OpenIDA 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 General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */


#ifndef _PANEL_PANELS_H
#define _PANEL_PANELS_H


#include <glib-object.h>
#include <gtk/gtkwidget.h>


#include "../analysis/binary.h"
#include "../gtkext/gtkviewpanel.h"








#define G_TYPE_EDITOR_PANEL               g_editor_panel_get_type()
#define G_EDITOR_PANEL(obj)               (G_TYPE_CHECK_INSTANCE_CAST((obj), g_editor_panel_get_type(), GEditorPanel))
#define G_IS_EDITOR_PANEL(obj)            (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_editor_panel_get_type()))
#define G_EDITOR_PANEL_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_EDITOR_PANEL, GEditorPanelClass))
#define G_IS_EDITOR_PANEL_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_EDITOR_PANEL))
#define G_EDITOR_PANEL_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_EDITOR_PANEL, GEditorPanelClass))


/* Panneaux à présenter dans l'éditeur (instance) */
typedef struct _GEditorPanel GEditorPanel;

/* Panneaux à présenter dans l'éditeur (classe) */
typedef struct _GEditorPanelClass GEditorPanelClass;



/* Indique le type défini pour un panneau d'éditeur. */
GType g_editor_panel_get_type(void);





/* Répercute sur les panneaux un nouveau binaire actif. */
void change_current_binary_in_panels(GObject *, GLoadedBinary *);





/* Procède au chargement de tous les panneaux internes. */
void init_internal_panels(void);

/* Lance une actualisation du fait d'un changement de binaire. */
void notify_panels_of_binary_change(GLoadedBinary *);

/* Lance une actualisation du fait d'un changement de vue. */
void notify_panels_of_view_change(GtkViewPanel *, bool);










#include <gtk/gtk.h>



/* Liste de tous les panneaux */
typedef enum _PanelType
{
    PNT_LOG,                                /* Messages système            */
    PNT_REGISTERS,                          /* Registres d'architecture    */
    PNT_STRINGS,                            /* Chaînes de carac. trouvées  */
    PNT_GLIMPSE,                            /* Aperçu d'un graphique       */

    PNT_COUNT

} PanelType;


/* Procède au chargement de tous les panneaux. */
void init_panels(GObject *);

/* Fournit la référence d'un panneau donné. */
GtkWidget *get_panel(PanelType);



#endif  /* _PANEL_PANELS_H */