Search
lxdream.org :: lxdream/src/gui/dump_win.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gui/dump_win.c
changeset 455:3080881d00d4
prev435:7a5d71e8560b
next457:af605fd32c0b
author nkeynes
date Sun Oct 21 05:21:35 2007 +0000 (13 years ago)
permissions -rw-r--r--
last change More GUI WIP
file annotate diff log raw
1.1 --- a/src/gui/dump_win.c Wed Oct 10 11:02:04 2007 +0000
1.2 +++ b/src/gui/dump_win.c Sun Oct 21 05:21:35 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: dump_win.c,v 1.4 2007-10-10 11:02:04 nkeynes Exp $
1.6 + * $Id: dump_win.c,v 1.5 2007-10-21 05:21:35 nkeynes Exp $
1.7 *
1.8 * Implements the memory dump window.
1.9 *
1.10 @@ -43,13 +43,13 @@
1.11
1.12 static dump_data_t dump_list_head = NULL;
1.13
1.14 -gboolean on_dump_win_delete_event( GtkWidget *widget, GdkEvent *event,
1.15 +gboolean on_dump_window_delete_event( GtkWidget *widget, GdkEvent *event,
1.16 gpointer user_data );
1.17 -void on_dump_win_button_view_clicked( GtkWidget *widget, gpointer user_data );
1.18 -void dump_win_set_text( dump_data_t data, unsigned char *old_data, unsigned char *new_data );
1.19 +void on_dump_window_button_view_clicked( GtkWidget *widget, gpointer user_data );
1.20 +void dump_window_set_text( dump_data_t data, unsigned char *old_data, unsigned char *new_data );
1.21
1.22
1.23 -void dump_window_new( void ) {
1.24 +void dump_window_new( const gchar *title ) {
1.25 GtkWidget *win = create_dump_win();
1.26 GtkWidget *dump_view_button = (GtkWidget *)g_object_get_data(G_OBJECT(win), "dump_view_button");
1.27 dump_data_t data = malloc( sizeof(struct dump_data) );
1.28 @@ -73,10 +73,10 @@
1.29 gtk_widget_modify_font(GTK_WIDGET(data->textArea),gui_fixed_font);
1.30
1.31 g_signal_connect ((gpointer) win, "delete_event",
1.32 - G_CALLBACK (on_dump_win_delete_event),
1.33 + G_CALLBACK (on_dump_window_delete_event),
1.34 data);
1.35 g_signal_connect ((gpointer) dump_view_button, "clicked",
1.36 - G_CALLBACK (on_dump_win_button_view_clicked),
1.37 + G_CALLBACK (on_dump_window_button_view_clicked),
1.38 data);
1.39 gtk_widget_show( GTK_WIDGET(win) );
1.40 }
1.41 @@ -105,7 +105,7 @@
1.42 }
1.43
1.44
1.45 -gboolean on_dump_win_delete_event( GtkWidget *widget, GdkEvent *event,
1.46 +gboolean on_dump_window_delete_event( GtkWidget *widget, GdkEvent *event,
1.47 gpointer user_data )
1.48 {
1.49 dump_data_t data = (dump_data_t)user_data;
1.50 @@ -125,7 +125,7 @@
1.51 return FALSE;
1.52 }
1.53
1.54 -void on_dump_win_button_view_clicked( GtkWidget *widget, gpointer user_data )
1.55 +void on_dump_window_button_view_clicked( GtkWidget *widget, gpointer user_data )
1.56 {
1.57 dump_data_t data = (dump_data_t)user_data;
1.58 uint32_t startVal, endVal;
1.59 @@ -156,12 +156,12 @@
1.60 if( startVal != endVal ) {
1.61 data->data = malloc( endVal - startVal );
1.62 mem_copy_from_sh4( data->data, startVal, endVal-startVal );
1.63 - dump_win_set_text( data, data->data, data->data );
1.64 + dump_window_set_text( data, data->data, data->data );
1.65 }
1.66 }
1.67 }
1.68
1.69 -void dump_win_update( dump_data_t data )
1.70 +void dump_window_update( dump_data_t data )
1.71 {
1.72 if( data->data == NULL )
1.73 return;
1.74 @@ -169,19 +169,19 @@
1.75 int length = data->end-data->start;
1.76 memcpy( tmp, data->data, length );
1.77 mem_copy_from_sh4( data->data, data->start, length );
1.78 - dump_win_set_text( data, tmp, data->data );
1.79 + dump_window_set_text( data, tmp, data->data );
1.80 }
1.81
1.82 -void dump_win_update_all( )
1.83 +void dump_window_update_all( )
1.84 {
1.85 dump_data_t node = dump_list_head;
1.86 while( node != NULL ) {
1.87 - dump_win_update(node);
1.88 + dump_window_update(node);
1.89 node = node->next;
1.90 }
1.91 }
1.92
1.93 -void dump_win_set_text( dump_data_t data, unsigned char *old_data, unsigned char *new_data )
1.94 +void dump_window_set_text( dump_data_t data, unsigned char *old_data, unsigned char *new_data )
1.95 {
1.96 GtkTextBuffer *buf = data->textBuffer;
1.97 GtkTextTag *changedTag = data->changedTag;
.