/* Chrysalide - 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 Chrysalide. * * 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 . */ #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 *); /* Réinitialise la position d'un noeud d'encapsulation. */ typedef void (* node_reset_pos_fc) (GGraphNode *); /* Définit les abscisses relatives du contenu d'un noeud. */ typedef void (* node_prepare_x_fc) (GGraphNode *, GGraphNode *); /* Applique une position finale au noeud. */ typedef void (* node_apply_pos_fc) (GGraphNode *); /* Altère la position du noeud d'encapsulation. */ typedef void (* node_set_pos_fc) (GGraphNode *, gint); /* Parcourt tous les noeuds graphiques dans un ordre donné. */ typedef bool (* visit_flow_nodes_fc) (GGraphNode *, graph_node_visitor_cb, void *); /* Recherche le noeud contenant un autre noeud. */ typedef GGraphNode * (* find_container_fc) (GGraphNode *, GGraphNode *); /* Intermédiaire entre le noeud dot et la bribe de code (instance) */ struct _GGraphNode { GObject parent; /* A laisser en premier */ GtkAllocation alloc; /* Emplacement du bloc rattaché*/ PendingPositionFlags pending_flag; /* Cible le champ valide */ pending_position pending_pos; /* Indication sur la position */ }; /* Intermédiaire entre le noeud dot et la bribe de code (classe) */ struct _GGraphNodeClass { GObjectClass parent; /* A laisser en premier */ get_node_rank_fc get_rank; /* Premier rang d'appartenance */ node_reset_pos_fc reset_pos; /* Réinitialise l'emplacement */ node_prepare_x_fc prepare_x; /* Préparation des abscisses */ node_apply_pos_fc apply_pos; /* Applique une absisse finale */ node_set_pos_fc set_pos; /* Définit l'emplacement */ visit_flow_nodes_fc visit; /* Visite des noeuds d'exécut° */ find_container_fc contain; /* Retrouve un conteneur */ }; #endif /* _GTKEXT_GRAPH_NODE_INT_H */