summaryrefslogtreecommitdiff
path: root/src/gtkext
diff options
context:
space:
mode:
Diffstat (limited to 'src/gtkext')
-rw-r--r--src/gtkext/graph/cluster.c14
-rw-r--r--src/gtkext/gtkbufferdisplay.c12
-rw-r--r--src/gtkext/gtkgraphdisplay.c3
3 files changed, 26 insertions, 3 deletions
diff --git a/src/gtkext/graph/cluster.c b/src/gtkext/graph/cluster.c
index bf49484..57c1bfb 100644
--- a/src/gtkext/graph/cluster.c
+++ b/src/gtkext/graph/cluster.c
@@ -34,6 +34,7 @@
#include "../gtkbufferdisplay.h"
#include "../gtkdisplaypanel.h"
#include "../../common/sort.h"
+#include "../../glibext/gbinarycursor.h" // REMME
#include "../../glibext/gloadedpanel.h"
@@ -302,6 +303,8 @@ GGraphCluster *g_graph_cluster_new(GLoadedBinary *binary, const GBlockList *list
GGraphCluster *result; /* Structure à retourner */
vmpa2t first; /* Début d'un groupe de lignes */
vmpa2t last; /* Fin d'un groupe de lignes */
+ GLineCursor *___tmp_first;
+ GLineCursor *___tmp_last;
GBufferCache *cache; /* Tampon brut à découper */
GBufferView *view; /* Partie affichée du tampon */
GtkRequisition requisition; /* Taille à l'écran actuelle */
@@ -326,10 +329,19 @@ GGraphCluster *g_graph_cluster_new(GLoadedBinary *binary, const GBlockList *list
g_basic_block_get_boundary_addresses(result->block, &first, &last);
+
+ ///////////////////////
+ ___tmp_first = g_binary_cursor_new();
+ g_binary_cursor_update(G_BINARY_CURSOR(___tmp_first), &first);
+ ___tmp_last = g_binary_cursor_new();
+ g_binary_cursor_update(G_BINARY_CURSOR(___tmp_last), &last);
+ ///////////////////////
+
+
cache = g_loaded_binary_get_disassembled_cache(binary);
view = g_buffer_view_new(cache, highlighted);
- g_buffer_view_restrict(view, &first, &last);
+ g_buffer_view_restrict(view, ___tmp_first, ___tmp_last);
gtk_buffer_display_set_view(GTK_BUFFER_DISPLAY(result->display), view);
/* Détermination d'une position initiale centrée */
diff --git a/src/gtkext/gtkbufferdisplay.c b/src/gtkext/gtkbufferdisplay.c
index 3ef77b5..49167e8 100644
--- a/src/gtkext/gtkbufferdisplay.c
+++ b/src/gtkext/gtkbufferdisplay.c
@@ -678,13 +678,23 @@ static bool gtk_buffer_display_get_address_coordinates(const GtkBufferDisplay *d
bool result; /* Bilan à remonter */
bool need_code; /* Recherche plus raffinée */
GBufferCache *cache; /* Gestionnaire de lignes */
+ GLineCursor *___tmp;
int height; /* Hauteur allouée */
need_code = (tweak == SPT_BOTTOM);
cache = g_buffer_view_get_cache(display->view);
- result = g_buffer_view_get_address_coordinates(display->view, addr, need_code, x, y);
+
+ ___tmp = g_binary_cursor_new();
+ g_binary_cursor_update(G_BINARY_CURSOR(___tmp), addr);
+
+
+ result = g_buffer_view_get_cursor_coordinates(display->view, ___tmp, need_code, x, y);
+
+
+ g_object_unref(G_OBJECT(___tmp));
+
if (result)
{
diff --git a/src/gtkext/gtkgraphdisplay.c b/src/gtkext/gtkgraphdisplay.c
index ce882f9..8c8e5da 100644
--- a/src/gtkext/gtkgraphdisplay.c
+++ b/src/gtkext/gtkgraphdisplay.c
@@ -1081,6 +1081,7 @@ static void gtk_graph_display_changed_highlights(GtkBlockDisplay *node, GtkGraph
static void gtk_graph_display_reach_caret_limit(GtkBufferDisplay *node, GdkScrollDirection dir, GtkGraphDisplay *display)
{
+#if 0
GBufferView *view; /* Vue d'un tampon global */
vmpa2t first; /* Début d'un groupe de lignes */
vmpa2t last; /* Fin d'un groupe de lignes */
@@ -1258,5 +1259,5 @@ static void gtk_graph_display_reach_caret_limit(GtkBufferDisplay *node, GdkScrol
}
/* TODO : scrolling... */
-
+#endif
}