summaryrefslogtreecommitdiff
path: root/src/gtkext
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2014-08-05 20:19:08 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2014-08-05 20:19:08 (GMT)
commit56ee4d3ecddeee05f11083fcc1595e3756b91790 (patch)
tree5ec6e5449214093280629047c36016a0de09cbeb /src/gtkext
parenta2eb5483fe74923e488013b2d8b94ded6340499e (diff)
Defined the first steps for a new disassembling approach.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@387 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gtkext')
-rw-r--r--src/gtkext/gtkbufferview.c12
-rw-r--r--src/gtkext/gtkviewpanel-int.h1
-rw-r--r--src/gtkext/gtkviewpanel.c1
3 files changed, 9 insertions, 5 deletions
diff --git a/src/gtkext/gtkbufferview.c b/src/gtkext/gtkbufferview.c
index 26f67c1..e58ae5c 100644
--- a/src/gtkext/gtkbufferview.c
+++ b/src/gtkext/gtkbufferview.c
@@ -372,6 +372,7 @@ static void gtk_buffer_view_get_preferred_width(GtkWidget *widget, gint *minimal
if (view->buffer_view != NULL)
*minimal = g_buffer_view_get_width(view->buffer_view,
+ *GTK_VIEW_PANEL(view)->display_phys,
*GTK_VIEW_PANEL(view)->display_addr,
*GTK_VIEW_PANEL(view)->display_code);
else
@@ -420,7 +421,7 @@ static void gtk_buffer_view_size_allocate(GtkWidget *widget, GtkAllocation *allo
view = GTK_BUFFER_VIEW(widget);
- width = g_buffer_view_get_width(view->buffer_view, *panel->display_addr, *panel->display_code);
+ width = g_buffer_view_get_width(view->buffer_view, *panel->display_phys, *panel->display_addr, *panel->display_code);
height = g_buffer_view_get_height(view->buffer_view);
gtk_view_panel_compute_allocation(panel, &valloc);
@@ -516,7 +517,7 @@ static gboolean gtk_buffer_view_draw(GtkWidget *widget, cairo_t *cr)
if (view->buffer_view != NULL)
g_buffer_view_draw(view->buffer_view, cr, fake_x, fake_y, &area,
- *pview->display_addr, *pview->display_code);
+ *pview->display_phys, *pview->display_addr, *pview->display_code);
return TRUE;
@@ -623,7 +624,8 @@ static void gtk_buffer_view_cache_glance(GtkBufferView *view, cairo_t *cairo, co
* *
* Paramètres : view = composant GTK à mettre à jour. *
* buffer = tampon de lignes à encadrer. *
-* addr = indique si les positions doivent être affichées. *
+* phys = indique si les positions doivent être affichées. *
+* virt = indique si les adresses doivent être affichées. *
* code = indique si le code binaire doit être affiché. *
* *
* Description : Prend acte de l'association d'un tampon de lignes. *
@@ -634,7 +636,7 @@ static void gtk_buffer_view_cache_glance(GtkBufferView *view, cairo_t *cairo, co
* *
******************************************************************************/
-void gtk_buffer_view_attach_buffer(GtkBufferView *view, GBufferView *buffer, bool *addr, bool *code)
+void gtk_buffer_view_attach_buffer(GtkBufferView *view, GBufferView *buffer, /*bool *phys, */bool *addr, bool *code)
{
gint width; /* Largeur de l'objet actuelle */
gint height; /* Hauteur de l'objet actuelle */
@@ -658,7 +660,7 @@ void gtk_buffer_view_attach_buffer(GtkBufferView *view, GBufferView *buffer, boo
/* Validation finale */
- width = g_buffer_view_get_width(view->buffer_view, *addr, *code);
+ width = g_buffer_view_get_width(view->buffer_view, true/* FIXME : *phys*/, *addr, *code);
height = g_buffer_view_get_height(view->buffer_view);
width += -view->left_text + 1;
diff --git a/src/gtkext/gtkviewpanel-int.h b/src/gtkext/gtkviewpanel-int.h
index 63a6a5b..b3a6cf6 100644
--- a/src/gtkext/gtkviewpanel-int.h
+++ b/src/gtkext/gtkviewpanel-int.h
@@ -68,6 +68,7 @@ struct _GtkViewPanel
get_addr_coordinates_fc get_coordinates;/* Conversion adresse <-> pos. */
cache_glance_fc cache_glance; /* Cache de la mignature */
+ bool *display_phys; /* Affichage des adresses ? */
bool *display_addr; /* Affichage des adresses ? */
bool *display_code; /* Affichage du code binaire ? */
diff --git a/src/gtkext/gtkviewpanel.c b/src/gtkext/gtkviewpanel.c
index 2b1aa97..739fde7 100644
--- a/src/gtkext/gtkviewpanel.c
+++ b/src/gtkext/gtkviewpanel.c
@@ -303,6 +303,7 @@ void gtk_view_panel_attach_binary(GtkViewPanel *panel, GLoadedBinary *binary, bo
g_object_ref(G_OBJECT(binary));
panel->binary = binary;
+ panel->display_phys = addr;
panel->display_addr = addr;
panel->display_code = code;