summaryrefslogtreecommitdiff
path: root/src/analysis/line.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2009-06-25 00:34:22 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2009-06-25 00:34:22 (GMT)
commitf2696c85e502e36a529a1d8ee3d209498ac2c0e9 (patch)
tree3d8ffe28a730d32c98e8d048b99f67b7856acec9 /src/analysis/line.c
parent23c7cd436e2ec980a68e6d12a6d8a750e357763c (diff)
Used Graphviz library for building graphs (first attempt).
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@80 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/line.c')
-rw-r--r--src/analysis/line.c46
1 files changed, 45 insertions, 1 deletions
diff --git a/src/analysis/line.c b/src/analysis/line.c
index 31a8a36..8cfad25 100644
--- a/src/analysis/line.c
+++ b/src/analysis/line.c
@@ -55,6 +55,7 @@ static void g_rendering_line_add_link_reference(GRenderingLine *, GRenderingLine
static GdkPixbuf *g_rendering_line_render_icon(const GRenderingLine *, const char *, GtkIconSize);
+
/* Indique le type définit pour une ligne de représentation. */
G_DEFINE_TYPE(GRenderingLine, g_rendering_line, G_TYPE_OBJECT);
@@ -296,6 +297,44 @@ void g_rendering_line_link_with(GRenderingLine *line, GRenderingLine *dest, Inst
/******************************************************************************
* *
+* Paramètres : line = ligne dont les informations sont à consulter. *
+* *
+* Description : Indique si la ligne a une ou plusieurs origines. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+bool g_rendering_line_has_sources(const GRenderingLine *line)
+{
+ return (line->from_count > 0);
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : line = ligne dont les informations sont à consulter. *
+* *
+* Description : Indique si la ligne a une suite autre que la ligne suivante. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+bool g_rendering_line_has_destination(const GRenderingLine *line)
+{
+ return (line->to != NULL && line->link_type != ILT_CALL);
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : line = ligne dont les informations sont à consulter. *
* stock_id = identifiant GTK de l'image à charger. *
* size = taille de l'image souhaitée. *
@@ -355,6 +394,11 @@ void g_rendering_line_draw(GRenderingLine *line, GdkDrawable *drawable, GdkGC *g
gdk_draw_layout(drawable, gc, x1, y, line->layout);
+ if (line->to != NULL)
+ pixbuf = g_rendering_line_render_icon(line, "gtk-bold", GTK_ICON_SIZE_MENU);
+ else
+
+
if (line->flags & RLF_BREAK_POINT)
pixbuf = g_rendering_line_render_icon(line, "gtk-yes", GTK_ICON_SIZE_MENU);
@@ -632,7 +676,7 @@ GRenderingLine *g_rendering_line_find_by_address(GRenderingLine *lines, const GR
lines_list_for_each(result, lines)
{
- if (result->offset == addr) break;
+ if (result->offset <= addr && addr < (result->offset + result->length)) break;
if (result == last)
{