diff options
Diffstat (limited to 'src/gtkext/graph/node-int.h')
-rw-r--r-- | src/gtkext/graph/node-int.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/src/gtkext/graph/node-int.h b/src/gtkext/graph/node-int.h new file mode 100644 index 0000000..9ecb072 --- /dev/null +++ b/src/gtkext/graph/node-int.h @@ -0,0 +1,79 @@ + +/* OpenIDA - Outil d'analyse de fichiers binaires + * node-int.h - prototypes pour la gestion élémentaire des blocs sous forme de noeuds + * + * Copyright (C) 2013 Cyrille Bagard + * + * This file is part of OpenIDA. + * + * OpenIDA is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * OpenIDA is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Foobar. If not, see <http://www.gnu.org/licenses/>. + */ + + +#ifndef _GTKEXT_GRAPH_NODE_INT_H +#define _GTKEXT_GRAPH_NODE_INT_H + + +#include "node.h" + + + +/* Fournit le rang du noeud dans le graphique. */ +typedef unsigned int (* get_node_rank_fc) (const GGraphNode *); + +/* Altère la position du noeud d'encapsulation. */ +typedef void (* node_set_pos_fc) (GGraphNode *, gint *, gint *); + +/* Fournit la position du noeud d'encapsulation. */ +typedef void (* node_get_pos_fc) (const GGraphNode *, gint *, gint *); + +/* Indique l'espace requis pour un noeud d'encapsulation. */ +typedef GtkAllocation (* node_get_alloc_fc) (const GGraphNode *); + +/* Parcourt tous les noeuds graphiques dans un ordre donné. */ +typedef bool (* visit_flow_nodes_fc) (GGraphNode *, graph_node_visitor_cb, void *); + + +/* Intermédiaire entre le noeud dot et la bribe de code (instance) */ +struct _GGraphNode +{ + GObject parent; /* A laisser en premier */ + + get_node_rank_fc get_rank; /* Premier rang d'appartenance */ + node_set_pos_fc set_pos; /* Définit l'emplacement */ + node_get_pos_fc get_pos; /* Fournit l'emplacement */ + node_get_alloc_fc get_alloc; /* Fournit l'espace nécessaire */ + visit_flow_nodes_fc visit; /* Visite des noeuds d'exécut° */ + + GtkWidget *view; /* Morceau de code représenté */ + char name[NODE_NAME_LEN]; /* Adresse sous forme humaine */ + + GtkAllocation alloc; /* Emplacement du bloc rattaché*/ + +}; + + +/* Intermédiaire entre le noeud dot et la bribe de code (classe) */ +struct _GGraphNodeClass +{ + GObjectClass parent; /* A laisser en premier */ + + double dpi_x; /* Résolution en abscisse */ + double dpi_y; /* Résolution en ordonnée */ + +}; + + + +#endif /* _GTKEXT_GRAPH_NODE_INT_H */ |