/* Chrysalide - Outil d'analyse de fichiers binaires * gtkviewpanel-int.h - définitions internes propre à l'affichage de contenu de binaire * * Copyright (C) 2010-2014 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 _GTK_VIEWPANEL_INT_H #define _GTK_VIEWPANEL_INT_H #include "gtkviewpanel.h" #include #include /* Indique les dimensions de travail du composant d'affichage. */ typedef void (* compute_requested_size) (GtkViewPanel *, gint *, gint *); /* Détermine la taille des bonds lors de défilements. */ typedef void (* compute_scroll_inc) (GtkViewPanel *, gint, GtkOrientation, gdouble *, gdouble *); /* Prend acte de l'association d'un binaire chargé. */ typedef void (* attach_binary_fc) (GtkViewPanel *, GLoadedBinary *); /* Réagit à la sélection externe d'une adresse. */ typedef void (* define_address_fc) (GtkViewPanel *, vmpa_t); /* Actualise les besoins internes avant un redimensionnement. */ typedef void (* prepare_resize_fc) (GtkViewPanel *); /* Indique la position d'affichage d'une adresse donnée. */ typedef bool (* get_addr_coordinates_fc) (const GtkViewPanel *, const vmpa2t *, gint *, gint *); /* Place en cache un rendu destiné à l'aperçu graphique rapide. */ typedef void (* cache_glance_fc) (GtkViewPanel *, cairo_t *, const GtkAllocation *, double); /* Composant d'affichage générique (instance) */ struct _GtkViewPanel { GtkFixed parent; /* A laisser en premier */ GtkAdjustment *hadjustment; /* Barre de défilement horiz. */ GtkAdjustment *vadjustment; /* Barre de défilement vert. */ GtkScrollablePolicy hscroll_policy; /* Politique horizontale */ GtkScrollablePolicy vscroll_policy; /* Politique verticale */ bool show_border; /* Affichage d'une bordure ? */ BinaryView content; /* Type de contenu */ const bool *display; /* Affichage des colonnes ? */ GLoadedBinary *binary; /* Binaire à visualiser */ attach_binary_fc attach; /* Association avec un binaire */ define_address_fc define; /* Centrage sur une partie */ prepare_resize_fc resize; /* Prépare une nouvelle taille */ cache_glance_fc cache_glance; /* Cache de la mignature */ }; /* Composant d'affichage générique (classe) */ struct _GtkViewPanelClass { GtkFixedClass parent; /* A laisser en premier */ compute_requested_size compute_size; /* Calcul de la taille requise */ compute_scroll_inc compute_inc; /* Calcul des bonds */ get_addr_coordinates_fc get_coordinates;/* Conversion adresse <-> pos. */ }; /* Propriétés propres au composant d'affichage */ typedef enum _ViewPanelProps { VPP_0, VPP_HADJUSTMENT, VPP_VADJUSTMENT, VPP_HSCROLL_POLICY, VPP_VSCROLL_POLICY } ViewPanelProps; #endif /* _GTK_VIEWPANEL_INT_H */