00001 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ 00002 /* 00003 data_interpretor.h 00004 heraia - an hexadecimal file editor and analyser based on ghex 00005 00006 (C) Copyright 2005 - 2011 Olivier Delhomme 00007 e-mail : heraia@delhomme.org 00008 URL : http://heraia.tuxfamily.org 00009 00010 This program is free software; you can redistribute it and/or modify 00011 it under the terms of the GNU General Public License as published by 00012 the Free Software Foundation; either version 2, or (at your option) 00013 any later version. 00014 00015 This program is distributed in the hope that it will be useful, 00016 but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 GNU General Public License for more details. 00019 00020 You should have received a copy of the GNU General Public License 00021 along with this program; if not, write to the Free Software 00022 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 00023 /** 00024 * @file data_interpretor.h 00025 * Header file for the data interpretor 00026 */ 00027 00028 #ifndef _DATA_INTERPRETOR_H_ 00029 #define _DATA_INTERPRETOR_H_ 00030 00031 /** 00032 * @note 00033 * Naming : 00034 * H stands for Heraia 00035 * DI stands for Data_Interpretor 00036 * 00037 * @def H_DI_DISPLAYED 00038 * Says whether data_interpretor is displayed or not 00039 * @todo this is used at initialisation time. We can add a new option to the 00040 * program in order to say wether we want the data interpretor to be 00041 * visible or not (regardless of options saved ?) 00042 * 00043 * @def H_DI_BIG_ENDIAN 00044 * Stands for big endian representation 00045 * 00046 * @def H_DI_MIDDLE_ENDIAN 00047 * Stands for middle endian representation (http://en.wikipedia.org/wiki/Endianness#Middle-endian) 00048 * 00049 * @def H_DI_LITTLE_ENDIAN 00050 * Stands for little endian representation (this is the default) 00051 */ 00052 #define H_DI_DISPLAYED FALSE /* By default the Data Interpretor Window is not displayed */ 00053 00054 /* Little Endian, Middle Endian and Big Endian in a reverse order ;) */ 00055 #define H_DI_BIG_ENDIAN 2 00056 #define H_DI_MIDDLE_ENDIAN 4 00057 #define H_DI_LITTLE_ENDIAN 8 00058 00059 extern guint which_endianness(heraia_struct_t *main_struct); 00060 extern guint which_stream_size(heraia_struct_t *main_struct); 00061 00062 extern void data_interpretor_init_interface(heraia_struct_t *main_struct); 00063 extern void refresh_data_interpretor_window(GtkWidget *hexwidget, gpointer data); 00064 00065 extern void add_tab_in_data_interpretor(GtkNotebook *notebook, tab_t *tab); 00066 extern tab_t *add_new_tab_in_data_interpretor(GtkNotebook *notebook, guint index, const gchar *label, guint num_cols, ...); 00067 extern void add_new_row_to_tab(tab_t *tab, decode_generic_t *row); 00068 00069 extern gint di_get_selected_tab(heraia_struct_t *main_struct); 00070 extern void di_set_selected_tab(heraia_struct_t *main_struct, gint selected_tab); 00071 00072 extern gint di_get_stream_size(heraia_struct_t *main_struct); 00073 extern void di_set_stream_size(heraia_struct_t *main_struct, gint stream_size); 00074 00075 extern gint di_get_endianness(heraia_struct_t *main_struct); 00076 extern void di_set_endianness(heraia_struct_t *main_struct, gint endianness); 00077 00078 #endif /* _DATA_INTERPRETOR_H_ */