/* Chrysalide - Outil d'analyse de fichiers binaires * loaded-int.h - définitions internes propres aux contenus chargés * * Copyright (C) 2017 Cyrille Bagard * * This file is part of Chrysalide. * * Chrysalide 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. * * Chrysalide 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 _ANALYSIS_LOADED_INT_H #define _ANALYSIS_LOADED_INT_H #include "loaded.h" /* Fournit le désignation associée à l'élément chargé. */ typedef const char * (* describe_loaded_fc) (const GLoadedContent *, bool); /* Détermine le nombre de vues disponibles pour un contenu. */ typedef unsigned int (* count_loaded_views_fc) (const GLoadedContent *); /* Met en place la vue demandée pour un contenu chargé. */ typedef GtkWidget * (* build_loaded_view_fc) (GLoadedContent *, unsigned int); /* Retrouve l'indice correspondant à la vue donnée d'un contenu. */ typedef unsigned int (* get_loaded_view_index_fc) (GLoadedContent *, GtkWidget *); /* Fournit toutes les options d'affichage pour un contenu. */ typedef bool * const (* get_all_loaded_options_fc) (const GLoadedContent *, unsigned int); /* Définit une option d'affichage pour un contenu. */ typedef bool ( * set_loaded_option_fc) (GLoadedContent *, unsigned int, unsigned int, bool); /* Accès à un contenu binaire quelconque (interface) */ struct _GLoadedContentIface { GTypeInterface base_iface; /* A laisser en premier */ /* Méthodes virtuelles */ describe_loaded_fc describe; /* Description de contenu */ count_loaded_views_fc count_views; /* Compteur de vues */ build_loaded_view_fc build_view; /* Mise en place de vues */ get_loaded_view_index_fc get_view_index;/* Récupération d'indice de vue*/ get_all_loaded_options_fc get_all_options; /* Obtention de liste brute*/ set_loaded_option_fc set_option; /* Définition d'affichage */ /* Signaux */ void (* display_changed) (GLoadedContent *, unsigned int, unsigned int); }; /* Redéfinition */ typedef GLoadedContentIface GLoadedContentInterface; #endif /* _ANALYSIS_LOADED_INT_H */