/* Chrysalide - Outil d'analyse de fichiers binaires
 * roptions.h - prototypes pour les options de rendus des lignes de code
 *
 * Copyright (C) 2009-2012 Cyrille Bagard
 *
 *  This file is part of Chrysalide.
 *
 *  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 Foobar.  If not, see .
 */
#ifndef _ANALYSIS_ROPTIONS_H
#define _ANALYSIS_ROPTIONS_H
#include 
#include 
#include "../arch/processor.h"
#include "../format/executable.h"
/* Support principal de rendu */
typedef enum _MainRendering
{
    MRD_BLOCK,                              /* Unique bloc de code         */
    MRD_GRAPH,                              /* Graphique de blocs de code  */
    MRD_COUNT
} MainRendering;
/* Zone de rendu */
typedef enum _ShowingArea
{
    SAR_ADDRESS,                            /* Adresse d'une ligne         */
    SAR_CODE,                               /* Code brut d'une ligne       */
    SAR_INSTRUCTION,                        /* Instruction d'une ligne     */
    SAR_COUNT
} ShowingArea;
#define G_TYPE_RENDERING_OPTIONS               g_rendering_options_get_type()
#define G_RENDERING_OPTIONS(obj)               (G_TYPE_CHECK_INSTANCE_CAST((obj), g_rendering_options_get_type(), GRenderingOptions))
#define G_IS_RENDERING_OPTIONS(obj)            (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_rendering_options_get_type()))
#define G_RENDERING_OPTIONS_GET_IFACE(inst)    (G_TYPE_INSTANCE_GET_INTERFACE((inst), g_rendering_options_get_type(), GRenderingOptionsIface))
#define G_RENDERING_OPTIONS_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_RENDERING_OPTIONS, GRenderingOptionsClass))
/* Options de représentation (instance) */
typedef struct _GRenderingOptions GRenderingOptions;
/* Options de représentation (classe) */
typedef struct _GRenderingOptionsClass GRenderingOptionsClass;
/* Indique le type défini pour des options de représentation. */
GType g_rendering_options_get_type(void);
/* Crée un un groupe d'options pour le rendu des lignes. */
GRenderingOptions *g_rendering_options_new(GExeFormat *);
/* Fournit le format du contenu binaire représenté. */
GExeFormat *g_rendering_options_get_format(const GRenderingOptions *);
/* Fournit l'architecture du contenu binaire représenté. */
GArchProcessor *g_rendering_options_get_processor(const GRenderingOptions *);
/* Fournit le style de rendu pour le contenu ASM. */
AsmSyntax g_rendering_options_get_syntax(const GRenderingOptions *);
/* Affiche (ou non) les adresses des instructions. */
void g_rendering_options_show_address(GRenderingOptions *, MainRendering, bool);
/* Indique si les adresses des instructions sont à afficher. */
bool g_rendering_options_has_to_show_address(const GRenderingOptions *, MainRendering);
/* Affiche (ou non) le code des instructions. */
void g_rendering_options_show_code(GRenderingOptions *, MainRendering, bool);
/* Indique si le code des instructions est à afficher. */
bool g_rendering_options_has_to_show_code(const GRenderingOptions *, MainRendering);
#endif  /* _ANALYSIS_ROPTIONS_H */