diff options
Diffstat (limited to 'src/gtkext/gtksourceview.c')
-rw-r--r-- | src/gtkext/gtksourceview.c | 147 |
1 files changed, 147 insertions, 0 deletions
diff --git a/src/gtkext/gtksourceview.c b/src/gtkext/gtksourceview.c new file mode 100644 index 0000000..14f7f95 --- /dev/null +++ b/src/gtkext/gtksourceview.c @@ -0,0 +1,147 @@ + +/* OpenIDA - Outil d'analyse de fichiers binaires + * gtksourceview.c - affichage de code source + * + * Copyright (C) 2010 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/>. + */ + + +#include "gtksourceview.h" + + +#include "gtkviewpanel-int.h" + + + +/* -------------------------- INTERACTION DIRECTE AVEC GTK -------------------------- */ + + +/* Composant d'affichage de code source (instance) */ +struct _GtkSourceView +{ + GtkViewPanel parent; /* A laisser en premier */ + +}; + +/* Composant d'affichage de code source (classe) */ +struct _GtkSourceViewClass +{ + GtkViewPanelClass parent; /* A laisser en premier */ + +}; + + +/* Procède à l'initialisation de l'afficheur de code source. */ +static void gtk_source_view_class_init(GtkSourceViewClass *); + +/* Procède à l'initialisation de l'afficheur de code source. */ +static void gtk_source_view_init(GtkSourceView *); + +/* Prend acte de l'association d'un binaire chargé. */ +static void gtk_source_view_attach_binary(GtkSourceView *, GOpenidaBinary *); + + +/* ---------------------------------------------------------------------------------- */ +/* INTERACTION DIRECTE AVEC GTK */ +/* ---------------------------------------------------------------------------------- */ + + +/* Détermine le type du composant d'affichage de code source. */ +G_DEFINE_TYPE(GtkSourceView, gtk_source_view, GTK_TYPE_VIEW_PANEL) + + +/****************************************************************************** +* * +* Paramètres : class = classe GTK à initialiser. * +* * +* Description : Procède à l'initialisation de l'afficheur de code source. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +static void gtk_source_view_class_init(GtkSourceViewClass *class) +{ + +} + + +/****************************************************************************** +* * +* Paramètres : view = composant GTK à initialiser. * +* * +* Description : Procède à l'initialisation de l'afficheur de code source. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +static void gtk_source_view_init(GtkSourceView *view) +{ + GtkViewPanel *panel; /* Instance parente */ + + panel = GTK_VIEW_PANEL(view); + + panel->attach = (attach_binary_fc)gtk_source_view_attach_binary; + +} + +/****************************************************************************** +* * +* Paramètres : - * +* * +* Description : Crée un nouveau composant pour l'affichage de code source. * +* * +* Retour : Composant GTK créé. * +* * +* Remarques : - * +* * +******************************************************************************/ + +GtkWidget *gtk_source_view_new(void) +{ + GtkSourceView *result; + + result = gtk_type_new(GTK_TYPE_SOURCE_VIEW); + + return GTK_WIDGET(result); + +} + + +/****************************************************************************** +* * +* Paramètres : view = composant GTK à mettre à jour. * +* binary = binaire associé à intégrer. * +* * +* Description : Prend acte de l'association d'un binaire chargé. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +static void gtk_source_view_attach_binary(GtkSourceView *view, GOpenidaBinary *binary) +{ + +} |