1 /* Hey EMACS -*- linux-c -*- */ 2 /* $Id: dbg_all.h 2707 2007-12-13 13:18:45Z roms $ */ 3 4 /* TiEmu - Tiemu Is an EMUlator 5 * 6 * Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin 7 * Copyright (c) 2001-2003, Romain Lievin 8 * Copyright (c) 2003, Julien Blache 9 * Copyright (c) 2004, Romain Li�vin 10 * Copyright (c) 2005-2006, Romain Li�vin, Kevin Kofler 11 * 12 * This program is free software; you can redistribute it and/or modify 13 * it under the terms of the GNU General Public License as published by 14 * the Free Software Foundation; either version 2 of the License, or 15 * (at your option) any later version. 16 * 17 * This program is distributed in the hope that it will be useful, 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 * GNU General Public License for more details. 21 * 22 * You should have received a copy of the GNU General Public License 23 * along with this program; if not, write to the Free Software 24 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. 25 */ 26 27 #ifndef __DBG_WINDOWS_H__ 28 #define __DBG_WINDOWS_H__ 29 30 #include <glib.h> 31 #include <gtk/gtk.h> 32 33 G_BEGIN_DECLS 34 #include "dbg_bkpts.h" 35 #include "dbg_bits.h" 36 #include "dbg_code.h" 37 #include "dbg_cause.h" 38 #include "dbg_data.h" 39 #include "dbg_mem.h" 40 #include "dbg_regs.h" 41 #include "dbg_vectors.h" 42 #include "dbg_pclog.h" 43 #include "dbg_stack.h" 44 #include "dbg_heap.h" 45 #include "dbg_entry.h" 46 #include "dbg_iop.h" 47 48 // calc.c: calculator window 49 extern GtkWidget *main_wnd; 50 51 // Save window state 52 #define WND_STATE 53 #define LINE_PAD 0 54 55 /* Definitions */ 56 57 typedef struct { 58 GtkWidget *mem; 59 GtkWidget *regs; 60 GtkWidget *bkpts; 61 GtkWidget *code; 62 GtkWidget *pclog; 63 GtkWidget *stack; 64 GtkWidget *heap; 65 GtkWidget *iop; 66 GtkWidget *dock; 67 } DbgWidgets; 68 extern DbgWidgets dbgw; 69 70 /* Functions */ 71 72 void dbgwnds_set_sensitivity(int state); 73 74 void dbgwnds_minimize_all(int all); 75 void dbgwnds_unminimize_all(int all); 76 77 void dbgwnds_show_all(int all); 78 void dbgwnds_hide_all(int all); 79 80 #define glade_get(s) glade_xml_get_widget(xml, (s)) 81 82 /* Macros */ 83 84 #define set_renderer_pad(renderer) \ 85 { \ 86 g_object_set(G_OBJECT(renderer), "xpad", LINE_PAD, NULL); \ 87 g_object_set(G_OBJECT(renderer), "ypad", LINE_PAD, NULL); \ 88 } 89 90 //#define MEASURE_WND_TIME 91 92 #ifdef MEASURE_WND_TIME 93 #define WND_TMR_START() GTimer *tmr = g_timer_new(); 94 #define WND_TMR_STOP(s) { \ 95 g_timer_stop(tmr); \ 96 printf("%s: %f\n", s, g_timer_elapsed(tmr, NULL)); \ 97 g_timer_destroy(tmr); \ 98 } 99 #else 100 #define WND_TMR_START() 101 #define WND_TMR_STOP(s) 102 #endif 103 104 G_END_DECLS 105 106 #endif 107