diff options
Diffstat (limited to 'src/gtkext/graph/ranks.h')
-rw-r--r-- | src/gtkext/graph/ranks.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/src/gtkext/graph/ranks.h b/src/gtkext/graph/ranks.h new file mode 100644 index 0000000..627269f --- /dev/null +++ b/src/gtkext/graph/ranks.h @@ -0,0 +1,63 @@ + +/* OpenIDA - Outil d'analyse de fichiers binaires + * ranks.h - prototypes pour le calcul de l'ordonnée des différents classements + * + * 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_RANKS_H +#define _GTKEXT_GRAPH_RANKS_H + + +#include <glib-object.h> + + + +#define G_TYPE_GRAPH_RANKS g_graph_ranks_get_type() +#define G_GRAPH_RANKS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_graph_ranks_get_type(), GGraphRanks)) +#define G_IS_GRAPH_RANKS(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_graph_ranks_get_type())) +#define G_GRAPH_RANKS_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE((inst), g_graph_ranks_get_type(), GGraphRanksIface)) +#define G_GRAPH_RANKS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_GRAPH_RANKS, GGraphRanksClass)) + + +/* Calcul de l'ordonnée des différents classements (instance) */ +typedef struct _GGraphRanks GGraphRanks; + +/* Calcul de l'ordonnée des différents classements (classe) */ +typedef struct _GGraphRanksClass GGraphRanksClass; + + +/* Indique le type définit par la GLib pour le calcul de l'ordonnée des classements. */ +GType g_graph_ranks_get_type(void); + +/* Prépare de quoi se définir au mieux les ordonnées des noeuds. */ +GGraphRanks *g_graph_ranks_new(unsigned int); + +/* Note une hauteur minimale requise pour un rang du classement. */ +void g_graph_ranks_set_min_height(GGraphRanks *, unsigned int, gint); + +/* Calcule l'ordonnée finale de chaque rang du classement. */ +void g_graph_ranks_compute_y_line(GGraphRanks *); + +/* Fournit la position verticale correspondant à un rang donné. */ +gint g_graph_ranks_get_y_for_rank(const GGraphRanks *, unsigned int); + + + +#endif /* _GTKEXT_GRAPH_RANKS_H */ |