diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2016-11-11 21:22:38 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2016-11-11 21:22:38 (GMT) |
commit | db934f20598340772f8c0256c8a8119790a1821e (patch) | |
tree | d03e57cc5fc953fc3e7653da74a8c58fd310de5d /src | |
parent | 2df715e74d6600ed0a5688a43f6ecd873957326a (diff) |
Prepared the new organization of display widgets.
Diffstat (limited to 'src')
34 files changed, 436 insertions, 436 deletions
diff --git a/src/analysis/db/items/move.c b/src/analysis/db/items/move.c index 14bc3bf..40d486c 100644 --- a/src/analysis/db/items/move.c +++ b/src/analysis/db/items/move.c @@ -37,7 +37,7 @@ #include "../item-int.h" #include "../../../common/io.h" #include "../../../gui/editem.h" -#include "../../../gtkext/gtkviewpanel.h" +#include "../../../gtkext/gtkdisplaypanel.h" @@ -423,11 +423,11 @@ static void g_db_move_build_label(GDbMove *move) static bool g_db_move_run(const GDbMove *move, const vmpa2t *addr) { - GtkViewPanel *vpanel; /* Afficheur effectif de code */ + GtkDisplayPanel *panel; /* Afficheur effectif de code */ typedef struct _move_params { - GtkViewPanel *vpanel; /* Afficheur effectif de code */ + GtkDisplayPanel *panel; /* Afficheur effectif de code */ vmpa2t addr; /* Adresse de déplacement */ } move_params; @@ -438,7 +438,7 @@ static bool g_db_move_run(const GDbMove *move, const vmpa2t *addr) void delete_move_params(move_params *p) { - g_object_unref(G_OBJECT(p->vpanel)); + g_object_unref(G_OBJECT(p->panel)); free(p); @@ -448,7 +448,7 @@ static bool g_db_move_run(const GDbMove *move, const vmpa2t *addr) gboolean do_move_in_main_loop(move_params *p) { - gtk_view_panel_scroll_to_address(p->vpanel, &p->addr, SPT_CENTER); + gtk_display_panel_scroll_to_address(p->panel, &p->addr, SPT_CENTER); return G_SOURCE_REMOVE; @@ -456,14 +456,14 @@ static bool g_db_move_run(const GDbMove *move, const vmpa2t *addr) /* Lancement de l'opération */ - vpanel = g_editor_item_get_current_view(NULL); + panel = g_editor_item_get_current_view(NULL); - if (vpanel != NULL) + if (panel != NULL) { params = (move_params *)calloc(1, sizeof(move_params)); - params->vpanel = vpanel; - g_object_ref(G_OBJECT(vpanel)); + params->panel = panel; + g_object_ref(G_OBJECT(panel)); copy_vmpa(¶ms->addr, addr); diff --git a/src/analysis/project.c b/src/analysis/project.c index 7b4f621..dce55b6 100644 --- a/src/analysis/project.c +++ b/src/analysis/project.c @@ -113,7 +113,7 @@ static void g_study_project_hide(const GStudyProject *); /* Met en place un ensemble de vues pour un binaire. */ -GPanelItem *_setup_new_panel_item_for_binary(GStudyProject *, GLoadedBinary *, BinaryView, GtkViewPanel **); +GPanelItem *_setup_new_panel_item_for_binary(GStudyProject *, GLoadedBinary *, BinaryView, GtkDisplayPanel **); @@ -589,7 +589,7 @@ void g_study_project_add_loaded_binary(GLoadedBinary *binary, GStudyProject *pro void g_study_project_attach_binary(GStudyProject *project, GLoadedBinary *binary) { loaded_binary *new; /* Nouveau binaire à présenter */ - GtkViewPanel *view; /* Composant d'affichage */ + GtkDisplayPanel *display; /* Composant d'affichage */ GPanelItem *panel; /* Nouveau panneau associé */ /* Mise en place */ @@ -627,7 +627,7 @@ void g_study_project_attach_binary(GStudyProject *project, GLoadedBinary *binary { range = g_binary_symbol_get_range(symbol); - gtk_view_panel_request_move(GTK_VIEW_PANEL(widget), get_mrange_addr(range)); + gtk_display_panel_request_move(GTK_DISPLAY_PANEL(widget), get_mrange_addr(range)); } @@ -637,11 +637,11 @@ void g_study_project_attach_binary(GStudyProject *project, GLoadedBinary *binary } - panel = _setup_new_panel_item_for_binary(project, binary, BVW_BLOCK, &view); + panel = _setup_new_panel_item_for_binary(project, binary, BVW_BLOCK, &display); g_mutex_unlock(&project->bin_mutex); - g_signal_connect(view, "size-allocate", G_CALLBACK(scroll_for_the_first_time), binary); + g_signal_connect(display, "size-allocate", G_CALLBACK(scroll_for_the_first_time), binary); g_panel_item_dock(panel); @@ -803,14 +803,14 @@ GLoadedBinary **g_study_project_get_binaries(const GStudyProject *project, size_ * * ******************************************************************************/ -GPanelItem *_setup_new_panel_item_for_binary(GStudyProject *project, GLoadedBinary *binary, BinaryView wanted, GtkViewPanel **panel) +GPanelItem *_setup_new_panel_item_for_binary(GStudyProject *project, GLoadedBinary *binary, BinaryView wanted, GtkDisplayPanel **panel) { GPanelItem *result; /* Nouveau panneau à renvoyer */ size_t k; /* Boucle de parcours #3 */ loaded_binary *handled; /* Dossier de suivi à compléter*/ - GtkViewPanel *views[BVW_COUNT]; /* Composants pour l'affichage */ + GtkDisplayPanel *displays[BVW_COUNT]; /* Composants pour l'affichage */ BinaryView i; /* Boucle de parcours #1 */ - GtkWidget *view; /* Affichage du binaire */ + GtkWidget *display; /* Affichage du binaire */ GtkWidget *scroll; /* Surface d'exposition */ GtkWidget *selected; /* Interface de prédilection */ const char *name; /* Titre associé au binaire */ @@ -836,33 +836,33 @@ GPanelItem *_setup_new_panel_item_for_binary(GStudyProject *project, GLoadedBina switch (i) { case BVW_BLOCK: - view = gtk_block_view_new(); + display = gtk_block_view_new(); break; case BVW_GRAPH: - view = gtk_graph_view_new(); + display = gtk_graph_view_new(); break; case BVW_SOURCE: - view = gtk_source_view_new(); + display = gtk_source_view_new(); break; default: /* GCC ! */ break; } - gtk_widget_show(view); + gtk_widget_show(display); - views[i] = GTK_VIEW_PANEL(view); + displays[i] = GTK_DISPLAY_PANEL(display); - gtk_view_panel_attach_binary(views[i], binary, i); + gtk_display_panel_attach_binary(displays[i], binary, i); /* Intégration finale dans un support défilant */ scroll = qck_create_scrolled_window(NULL, NULL); - gtk_container_add(GTK_CONTAINER(scroll), view); + gtk_container_add(GTK_CONTAINER(scroll), display); if (i == wanted) { selected = scroll; - *panel = GTK_VIEW_PANEL(view); + *panel = GTK_DISPLAY_PANEL(display); } } @@ -889,13 +889,13 @@ GPanelItem *_setup_new_panel_item_for_binary(GStudyProject *project, GLoadedBina switch (j) { case BVW_BLOCK: - g_object_set_data(G_OBJECT(views[i]), "block_alt_view", views[j]); + g_object_set_data(G_OBJECT(displays[i]), "block_alt_view", displays[j]); break; case BVW_GRAPH: - g_object_set_data(G_OBJECT(views[i]), "graph_alt_view", views[j]); + g_object_set_data(G_OBJECT(displays[i]), "graph_alt_view", displays[j]); break; case BVW_SOURCE: - g_object_set_data(G_OBJECT(views[i]), "source_alt_view", views[j]); + g_object_set_data(G_OBJECT(displays[i]), "source_alt_view", displays[j]); break; default: /* GCC ! */ break; @@ -923,7 +923,7 @@ GPanelItem *_setup_new_panel_item_for_binary(GStudyProject *project, GLoadedBina * * ******************************************************************************/ -GPanelItem *setup_new_panel_item_for_binary(GStudyProject *project, GLoadedBinary *binary, BinaryView wanted, GtkViewPanel **panel) +GPanelItem *setup_new_panel_item_for_binary(GStudyProject *project, GLoadedBinary *binary, BinaryView wanted, GtkDisplayPanel **panel) { GPanelItem *result; /* Nouveau panneau à renvoyer */ @@ -955,7 +955,7 @@ GPanelItem *setup_new_panel_item_for_binary(GStudyProject *project, GLoadedBinar * * ******************************************************************************/ -GtkDockStation *get_dock_station_for_view_panel(GtkViewPanel *panel) +GtkDockStation *get_dock_station_for_view_panel(GtkDisplayPanel *panel) { GtkWidget *result; /* Support trouvé à retourner */ @@ -988,7 +988,7 @@ GtkDockStation *get_dock_station_for_view_panel(GtkViewPanel *panel) * * ******************************************************************************/ -GtkWidget *get_scroll_window_for_view_panel(GtkViewPanel *panel) +GtkWidget *get_scroll_window_for_view_panel(GtkDisplayPanel *panel) { GtkWidget *result; /* Support trouvé à retourner */ @@ -1021,20 +1021,20 @@ GtkWidget *get_scroll_window_for_view_panel(GtkViewPanel *panel) * * ******************************************************************************/ -GtkViewPanel *get_alt_view_for_view_panel(GtkViewPanel *panel, BinaryView view) +GtkDisplayPanel *get_alt_view_for_view_panel(GtkDisplayPanel *panel, BinaryView view) { - GtkViewPanel *result; /* Panneau visé à renvoyer */ + GtkDisplayPanel *result; /* Panneau visé à renvoyer */ switch (view) { case BVW_BLOCK: - result = GTK_VIEW_PANEL(g_object_get_data(G_OBJECT(panel), "block_alt_view")); + result = GTK_DISPLAY_PANEL(g_object_get_data(G_OBJECT(panel), "block_alt_view")); break; case BVW_GRAPH: - result = GTK_VIEW_PANEL(g_object_get_data(G_OBJECT(panel), "graph_alt_view")); + result = GTK_DISPLAY_PANEL(g_object_get_data(G_OBJECT(panel), "graph_alt_view")); break; case BVW_SOURCE: - result = GTK_VIEW_PANEL(g_object_get_data(G_OBJECT(panel), "source_alt_view")); + result = GTK_DISPLAY_PANEL(g_object_get_data(G_OBJECT(panel), "source_alt_view")); break; default: assert(false); diff --git a/src/analysis/project.h b/src/analysis/project.h index 7d8d010..3c29102 100644 --- a/src/analysis/project.h +++ b/src/analysis/project.h @@ -30,7 +30,7 @@ #include "binary.h" #include "../gtkext/gtkdockstation.h" -#include "../gtkext/gtkviewpanel.h" +#include "../gtkext/gtkdisplaypanel.h" /** @@ -112,16 +112,16 @@ GLoadedBinary **g_study_project_get_binaries(const GStudyProject *, size_t *); /* Met en place un ensemble de vues pour un binaire. */ -GPanelItem *setup_new_panel_item_for_binary(GStudyProject *, GLoadedBinary *, BinaryView, GtkViewPanel **); +GPanelItem *setup_new_panel_item_for_binary(GStudyProject *, GLoadedBinary *, BinaryView, GtkDisplayPanel **); /* Fournit la station d'accueil d'un panneau d'affichage. */ -GtkDockStation *get_dock_station_for_view_panel(GtkViewPanel *); +GtkDockStation *get_dock_station_for_view_panel(GtkDisplayPanel *); /* Fournit le support défilant d'un panneau d'affichage. */ -GtkWidget *get_scroll_window_for_view_panel(GtkViewPanel *); +GtkWidget *get_scroll_window_for_view_panel(GtkDisplayPanel *); /* Fournit une vision alternative d'un panneau d'affichage. */ -GtkViewPanel *get_alt_view_for_view_panel(GtkViewPanel *, BinaryView); +GtkDisplayPanel *get_alt_view_for_view_panel(GtkDisplayPanel *, BinaryView); diff --git a/src/gtkext/Makefile.am b/src/gtkext/Makefile.am index f1bd18a..45ce4ad 100644 --- a/src/gtkext/Makefile.am +++ b/src/gtkext/Makefile.am @@ -8,14 +8,14 @@ libgtkext_la_SOURCES = \ gtkblockview.h gtkblockview.c \ gtkbufferview-int.h \ gtkbufferview.h gtkbufferview.c \ + gtkdisplaypanel-int.h \ + gtkdisplaypanel.h gtkdisplaypanel.c \ gtkdockable-int.h \ gtkdockable.h gtkdockable.c \ gtkdockstation.h gtkdockstation.c \ gtkgraphview.h gtkgraphview.c \ gtksourceview.h gtksourceview.c \ gtkstatusstack.h gtkstatusstack.c \ - gtkviewpanel-int.h \ - gtkviewpanel.h gtkviewpanel.c \ support.h support.c libgtkext_la_LIBADD = \ diff --git a/src/gtkext/graph/cluster.c b/src/gtkext/graph/cluster.c index 6ff4b8a..06e06c2 100644 --- a/src/gtkext/graph/cluster.c +++ b/src/gtkext/graph/cluster.c @@ -32,7 +32,7 @@ #include "../gtkblockview.h" #include "../gtkbufferview.h" -#include "../gtkviewpanel.h" +#include "../gtkdisplaypanel.h" #include "../../common/sort.h" @@ -315,9 +315,9 @@ GGraphCluster *g_graph_cluster_new(GLoadedBinary *binary, const GBlockList *list result->view = gtk_block_view_new(); gtk_widget_show(result->view); - gtk_view_panel_attach_binary(GTK_VIEW_PANEL(result->view), binary, BVW_GRAPH); + gtk_display_panel_attach_binary(GTK_DISPLAY_PANEL(result->view), binary, BVW_GRAPH); - gtk_view_panel_show_border(GTK_VIEW_PANEL(result->view), true); + gtk_display_panel_show_border(GTK_DISPLAY_PANEL(result->view), true); /* Restriction au bloc basique */ diff --git a/src/gtkext/gtkblockview.c b/src/gtkext/gtkblockview.c index 5f3e112..82743b0 100644 --- a/src/gtkext/gtkblockview.c +++ b/src/gtkext/gtkblockview.c @@ -93,10 +93,10 @@ G_DEFINE_TYPE(GtkBlockView, gtk_block_view, GTK_TYPE_BUFFER_VIEW) static void gtk_block_view_class_init(GtkBlockViewClass *class) { - GtkViewPanelClass *panel_class; /* Classe parente */ + GtkDisplayPanelClass *panel_class; /* Classe parente */ GtkBufferViewClass *buffer_class; /* Classe supérieure */ - panel_class = GTK_VIEW_PANEL_CLASS(class); + panel_class = GTK_DISPLAY_PANEL_CLASS(class); buffer_class = GTK_BUFFER_VIEW_CLASS(class); panel_class->attach = (attach_binary_fc)gtk_block_view_attach_binary; @@ -158,7 +158,7 @@ static bool gtk_block_view_notify_caret_relocation(GtkBlockView *view, const Gdk bool result; /* Bilan à retourner */ result = g_buffer_view_highlight_segments(GTK_BUFFER_VIEW(view)->buffer_view, area->x, area->y, - GTK_VIEW_PANEL(view)->display); + GTK_DISPLAY_PANEL(view)->display); if (result) g_signal_emit_by_name(view, "highlight-changed"); @@ -225,7 +225,7 @@ static gboolean gtk_block_view_button_press_event(GtkBlockView *view, GdkEventBu real_x = event->x; real_y = event->y; - gtk_view_panel_compute_real_coord(GTK_VIEW_PANEL(bview), &real_x, &real_y); + gtk_display_panel_compute_real_coord(GTK_DISPLAY_PANEL(bview), &real_x, &real_y); g_buffer_view_highlight_segments(gtk_buffer_view_get_buffer(bview), real_x, real_y, NULL); diff --git a/src/gtkext/gtkbufferview-int.h b/src/gtkext/gtkbufferview-int.h index 561167c..a7da69d 100644 --- a/src/gtkext/gtkbufferview-int.h +++ b/src/gtkext/gtkbufferview-int.h @@ -28,7 +28,7 @@ #include "gtkbufferview.h" -#include "gtkviewpanel-int.h" +#include "gtkdisplaypanel-int.h" @@ -39,7 +39,7 @@ typedef bool (* notify_caret_relocation_fc) (GtkBufferView *, const GdkRectangle /* Composant d'affichage de tampon de lignes (instance) */ struct _GtkBufferView { - GtkViewPanel parent; /* A laisser en premier */ + GtkDisplayPanel parent; /* A laisser en premier */ //GCodeBuffer *buffer; /* Code sous forme de texte */ GBufferView *buffer_view; /* Affichage de cette forme */ @@ -58,7 +58,7 @@ struct _GtkBufferView /* Composant d'affichage de tampon de lignes (classe) */ struct _GtkBufferViewClass { - GtkViewPanelClass parent; /* A laisser en premier */ + GtkDisplayPanelClass parent; /* A laisser en premier */ notify_caret_relocation_fc notify_caret;/* Accompagne un déplacement */ diff --git a/src/gtkext/gtkbufferview.c b/src/gtkext/gtkbufferview.c index 1f4399a..bafb15d 100644 --- a/src/gtkext/gtkbufferview.c +++ b/src/gtkext/gtkbufferview.c @@ -110,7 +110,7 @@ static gboolean gtk_buffer_view_refresh_caret(GtkBufferView *); /* Détermine le type du composant d'affichage de tampon de lignes. */ -G_DEFINE_TYPE(GtkBufferView, gtk_buffer_view, GTK_TYPE_VIEW_PANEL) +G_DEFINE_TYPE(GtkBufferView, gtk_buffer_view, GTK_TYPE_DISPLAY_PANEL) /****************************************************************************** @@ -129,11 +129,11 @@ static void gtk_buffer_view_class_init(GtkBufferViewClass *class) { GObjectClass *object; /* Autre version de la classe */ GtkWidgetClass *widget_class; /* Classe version Widget */ - GtkViewPanelClass *panel_class; /* Classe parente */ + GtkDisplayPanelClass *panel_class; /* Classe parente */ object = G_OBJECT_CLASS(class); widget_class = GTK_WIDGET_CLASS(class); - panel_class = GTK_VIEW_PANEL_CLASS(class); + panel_class = GTK_DISPLAY_PANEL_CLASS(class); object->dispose = (GObjectFinalizeFunc/* ! */)gtk_buffer_view_dispose; object->finalize = (GObjectFinalizeFunc)gtk_buffer_view_finalize; @@ -295,7 +295,7 @@ static gboolean gtk_buffer_view_button_press(GtkWidget *widget, GdkEventButton * real_x = event->x; real_y = event->y; - gtk_view_panel_compute_real_coord(GTK_VIEW_PANEL(view), &real_x, &real_y); + gtk_display_panel_compute_real_coord(GTK_DISPLAY_PANEL(view), &real_x, &real_y); printf(" !mouse! :: (%g ; %g) -> (%d ; %d)\n", event->x, event->y, @@ -337,7 +337,7 @@ static gboolean gtk_buffer_view_button_press(GtkWidget *widget, GdkEventButton * static gboolean gtk_buffer_view_draw(GtkWidget *widget, cairo_t *cr) { GtkBufferView *view; /* Autre version du composant */ - GtkViewPanel *pview; /* Autre version du composant */ + GtkDisplayPanel *panel; /* Autre version du composant */ GdkWindow *window; /* Fenêtre à redessiner */ cairo_region_t *region; /* Région visible à redessiner */ cairo_rectangle_int_t area; /* Surface correspondante */ @@ -349,7 +349,7 @@ static gboolean gtk_buffer_view_draw(GtkWidget *widget, cairo_t *cr) gint *selected; /* Ordonnée d'une sélection */ view = GTK_BUFFER_VIEW(widget); - pview = GTK_VIEW_PANEL(widget); + panel = GTK_DISPLAY_PANEL(widget); window = gtk_widget_get_window(widget); @@ -362,9 +362,9 @@ static gboolean gtk_buffer_view_draw(GtkWidget *widget, cairo_t *cr) context = gtk_widget_get_style_context(widget); - if (pview->show_border) + if (panel->show_border) { - gtk_view_panel_define_border_path(pview, cr, 0, 0); + gtk_display_panel_define_border_path(panel, cr, 0, 0); cairo_clip(cr); } @@ -418,8 +418,8 @@ static gboolean gtk_buffer_view_draw(GtkWidget *widget, cairo_t *cr) /* Eventuelle bordure globale */ - if (pview->show_border) - gtk_view_panel_draw_border(pview, cr); + if (panel->show_border) + gtk_display_panel_draw_border(panel, cr); /* Impression du désassemblage */ @@ -427,7 +427,7 @@ static gboolean gtk_buffer_view_draw(GtkWidget *widget, cairo_t *cr) { fake_x = 0; fake_y = 0; - gtk_view_panel_compute_fake_coord(GTK_VIEW_PANEL(view), &fake_x, &fake_y); + gtk_display_panel_compute_fake_coord(GTK_DISPLAY_PANEL(view), &fake_x, &fake_y); g_generic_config_get_value(get_main_configuration(), MPK_SELECTION_LINE, &sel_line); sel_line &= gtk_widget_has_focus(widget); @@ -437,7 +437,7 @@ static gboolean gtk_buffer_view_draw(GtkWidget *widget, cairo_t *cr) else selected = &view->caret.y; - g_buffer_view_draw(view->buffer_view, cr, fake_x, fake_y, &area, pview->display, selected); + g_buffer_view_draw(view->buffer_view, cr, fake_x, fake_y, &area, panel->display, selected); } @@ -473,7 +473,7 @@ static gboolean gtk_buffer_view_key_press(GtkWidget *widget, GdkEventKey *event) { gboolean result; /* Suites à renvoyer */ GtkBufferView *view; /* Autre version du composant */ - GtkViewPanel *pview; /* Autre version du composant */ + GtkDisplayPanel *panel; /* Autre version du composant */ bool ctrl; /* Statut de la touche Contrôle*/ GdkScrollDirection dir; /* Direction du déplacement */ GdkRectangle area; /* Emplacement de curseur */ @@ -482,7 +482,7 @@ static gboolean gtk_buffer_view_key_press(GtkWidget *widget, GdkEventKey *event) result = FALSE; view = GTK_BUFFER_VIEW(widget); - pview = GTK_VIEW_PANEL(widget); + panel = GTK_DISPLAY_PANEL(widget); switch (event->keyval) { @@ -516,12 +516,12 @@ static gboolean gtk_buffer_view_key_press(GtkWidget *widget, GdkEventKey *event) area = view->caret; ctrl = (event->state & GDK_CONTROL_MASK); - addr = g_buffer_view_move_caret(view->buffer_view, &area, ctrl, dir, pview->display); + addr = g_buffer_view_move_caret(view->buffer_view, &area, ctrl, dir, panel->display); if (addr != NULL) { gtk_buffer_view_relocate_caret(view, &area, addr); - _gtk_view_panel_scroll_to_address(pview, addr, SPT_RAW, false); + _gtk_display_panel_scroll_to_address(panel, addr, SPT_RAW, false); } else g_signal_emit_by_name(view, "reach-limit", dir); @@ -589,11 +589,11 @@ static gboolean gtk_buffer_view_query_tooltip(GtkWidget *widget, gint x, gint y, real_x = x; real_y = y; - gtk_view_panel_compute_real_coord(GTK_VIEW_PANEL(view), &real_x, &real_y); + gtk_display_panel_compute_real_coord(GTK_DISPLAY_PANEL(view), &real_x, &real_y); line = g_buffer_view_find_line_and_creator_at(view->buffer_view, &real_x, real_y, NULL, - GTK_VIEW_PANEL(view)->display, &creator); + GTK_DISPLAY_PANEL(view)->display, &creator); if (line == NULL || creator == NULL) goto no_tooltip; @@ -619,7 +619,7 @@ static gboolean gtk_buffer_view_query_tooltip(GtkWidget *widget, gint x, gint y, /* Construction du contenu textuel */ - format = G_BIN_FORMAT(g_loaded_binary_get_format(GTK_VIEW_PANEL(view)->binary)); + format = G_BIN_FORMAT(g_loaded_binary_get_format(GTK_DISPLAY_PANEL(view)->binary)); if (!g_binary_format_find_symbol_at(format, &addr, &target_sym)) goto no_tooltip; @@ -634,7 +634,7 @@ static gboolean gtk_buffer_view_query_tooltip(GtkWidget *widget, gint x, gint y, * celui propre au bloc basique courant. */ - buffer = g_loaded_binary_get_disassembled_buffer(GTK_VIEW_PANEL(view)->binary); + buffer = g_loaded_binary_get_disassembled_buffer(GTK_DISPLAY_PANEL(view)->binary); if (g_binary_format_find_next_symbol_at(format, &addr, &next_sym)) stop_addr = get_mrange_addr(g_binary_symbol_get_range(next_sym)); @@ -721,7 +721,7 @@ static void gtk_buffer_view_compute_requested_size(GtkBufferView *view, gint *wi if (width != NULL) { if (view->buffer_view != NULL) - *width = g_buffer_view_get_width(view->buffer_view, GTK_VIEW_PANEL(view)->display); + *width = g_buffer_view_get_width(view->buffer_view, GTK_DISPLAY_PANEL(view)->display); else *width = 0; } @@ -762,7 +762,7 @@ static void gtk_buffer_view_compute_scroll_inc(GtkBufferView *view, gint size, G } else - GTK_VIEW_PANEL_CLASS(gtk_buffer_view_parent_class)->compute_inc(GTK_VIEW_PANEL(view), + GTK_DISPLAY_PANEL_CLASS(gtk_buffer_view_parent_class)->compute_inc(GTK_DISPLAY_PANEL(view), size, orientation, step, page); } @@ -841,7 +841,7 @@ static bool gtk_buffer_view_get_address_coordinates(const GtkBufferView *view, c if (result) { - *x += g_buffer_view_get_margin(view->buffer_view, GTK_VIEW_PANEL(view)->display); + *x += g_buffer_view_get_margin(view->buffer_view, GTK_DISPLAY_PANEL(view)->display); height = gtk_widget_get_allocated_height(GTK_WIDGET(view)); @@ -895,7 +895,7 @@ static bool gtk_buffer_view_get_position(const GtkBufferView *view, GBufferLine *line = g_buffer_view_find_line_and_creator_at(view->buffer_view, (gint []){ view->caret.x }, view->caret.y, NULL, - GTK_VIEW_PANEL(view)->display, &obj); + GTK_DISPLAY_PANEL(view)->display, &obj); if (creator != NULL) *creator = obj; @@ -969,7 +969,7 @@ void gtk_buffer_view_attach_buffer(GtkBufferView *view, GBufferView *buffer) /* Validation finale */ - width = g_buffer_view_get_width(view->buffer_view, GTK_VIEW_PANEL(view)->display); + width = g_buffer_view_get_width(view->buffer_view, GTK_DISPLAY_PANEL(view)->display); height = g_buffer_view_get_height(view->buffer_view); width += -view->left_text + 1; @@ -1027,7 +1027,7 @@ static bool _gtk_buffer_view_move_caret_to(GtkBufferView *view, gint x, gint y) { size_t index; /* Indice de ligne de tampon */ GBufferLine *line; /* Ligne à la position courante*/ - GtkViewPanel *pview; /* Autre version du composant */ + GtkDisplayPanel *panel; /* Autre version du composant */ const vmpa2t *addr; /* Position mémoire associée */ GdkRectangle new; /* Nouvel emplacement calculé */ @@ -1036,9 +1036,9 @@ static bool _gtk_buffer_view_move_caret_to(GtkBufferView *view, gint x, gint y) line = g_buffer_view_find_line_at(view->buffer_view, y, &index); if (line == NULL) return false; - pview = GTK_VIEW_PANEL(view); + panel = GTK_DISPLAY_PANEL(view); - addr = g_buffer_view_compute_caret_full(view->buffer_view, line, index, x, pview->display, &new); + addr = g_buffer_view_compute_caret_full(view->buffer_view, line, index, x, panel->display, &new); if (addr != NULL) gtk_buffer_view_relocate_caret(view, &new, addr); @@ -1128,7 +1128,7 @@ static void gtk_buffer_view_relocate_caret(GtkBufferView *view, const GdkRectang else if (clear_old) { - gtk_view_panel_compute_relative_coords(GTK_VIEW_PANEL(view), &old_area.x, &old_area.y); + gtk_display_panel_compute_relative_coords(GTK_DISPLAY_PANEL(view), &old_area.x, &old_area.y); gtk_widget_queue_draw_area(GTK_WIDGET(view), old_area.x, old_area.y, old_area.width, old_area.height); @@ -1209,7 +1209,7 @@ static gboolean gtk_buffer_view_refresh_caret(GtkBufferView *view) } area = view->caret; - gtk_view_panel_compute_relative_coords(GTK_VIEW_PANEL(view), &area.x, &area.y); + gtk_display_panel_compute_relative_coords(GTK_DISPLAY_PANEL(view), &area.x, &area.y); /* Réinitialisation de la surface */ if (view->show_caret) diff --git a/src/gtkext/gtkviewpanel-int.h b/src/gtkext/gtkdisplaypanel-int.h index edcc3d9..bc0e229 100644 --- a/src/gtkext/gtkviewpanel-int.h +++ b/src/gtkext/gtkdisplaypanel-int.h @@ -1,6 +1,6 @@ /* Chrysalide - Outil d'analyse de fichiers binaires - * gtkviewpanel-int.h - définitions internes propre à l'affichage de contenu de binaire + * gtkdisplaypanel-int.h - définitions internes propre à l'affichage de contenu de binaire * * Copyright (C) 2010-2014 Cyrille Bagard * @@ -21,11 +21,11 @@ */ -#ifndef _GTK_VIEWPANEL_INT_H -#define _GTK_VIEWPANEL_INT_H +#ifndef _GTK_DISPLAYPANEL_INT_H +#define _GTK_DISPLAYPANEL_INT_H -#include "gtkviewpanel.h" +#include "gtkdisplaypanel.h" #include <stdbool.h> @@ -34,42 +34,42 @@ /* Prend acte de l'association d'un binaire chargé. */ -typedef void (* attach_binary_fc) (GtkViewPanel *, GLoadedBinary *); +typedef void (* attach_binary_fc) (GtkDisplayPanel *, GLoadedBinary *); /* Indique les dimensions de travail du composant d'affichage. */ -typedef void (* compute_requested_size_fc) (GtkViewPanel *, gint *, gint *); +typedef void (* compute_requested_size_fc) (GtkDisplayPanel *, gint *, gint *); /* Détermine la taille des bonds lors de défilements. */ -typedef void (* compute_scroll_inc_fc) (GtkViewPanel *, gint, GtkOrientation, gdouble *, gdouble *); +typedef void (* compute_scroll_inc_fc) (GtkDisplayPanel *, gint, GtkOrientation, gdouble *, gdouble *); /* Réagit à un défilement chez une barre associée au composant. */ -typedef void (* adjust_scroll_value_fc) (GtkViewPanel *, GtkAdjustment *, GtkOrientation); +typedef void (* adjust_scroll_value_fc) (GtkDisplayPanel *, GtkAdjustment *, GtkOrientation); /* Réagit à la sélection externe d'une adresse. */ -typedef void (* define_address_fc) (GtkViewPanel *, const vmpa2t *); +typedef void (* define_address_fc) (GtkDisplayPanel *, const vmpa2t *); /* Actualise les besoins internes avant un redimensionnement. */ -typedef void (* prepare_resize_fc) (GtkViewPanel *); +typedef void (* prepare_resize_fc) (GtkDisplayPanel *); /* Indique la position courante du curseur. */ -typedef const vmpa2t * (* get_caret_location_fc) (const GtkViewPanel *); +typedef const vmpa2t * (* get_caret_location_fc) (const GtkDisplayPanel *); /* Indique la position d'affichage d'une adresse donnée. */ -typedef bool (* get_addr_coordinates_fc) (const GtkViewPanel *, const vmpa2t *, gint *, gint *, ScrollPositionTweak); +typedef bool (* get_addr_coordinates_fc) (const GtkDisplayPanel *, const vmpa2t *, gint *, gint *, ScrollPositionTweak); /* Fournit des éléments liés à la position courante dans la vue. */ -typedef bool (* get_view_position_fc) (const GtkViewPanel *, GBufferLine **, GObject **); +typedef bool (* get_view_position_fc) (const GtkDisplayPanel *, GBufferLine **, GObject **); /* Déplace le curseur à un emplacement défini. */ -typedef bool (* move_caret_to_fc) (GtkViewPanel *, gint, gint); +typedef bool (* move_caret_to_fc) (GtkDisplayPanel *, gint, gint); /* Place en cache un rendu destiné à l'aperçu graphique rapide. */ -typedef void (* cache_glance_fc) (GtkViewPanel *, cairo_t *, const GtkAllocation *, double); +typedef void (* cache_glance_fc) (GtkDisplayPanel *, cairo_t *, const GtkAllocation *, double); /* Composant d'affichage générique (instance) */ -struct _GtkViewPanel +struct _GtkDisplayPanel { GtkFixed parent; /* A laisser en premier */ @@ -90,7 +90,7 @@ struct _GtkViewPanel }; /* Composant d'affichage générique (classe) */ -struct _GtkViewPanelClass +struct _GtkDisplayPanelClass { GtkFixedClass parent; /* A laisser en premier */ @@ -107,9 +107,9 @@ struct _GtkViewPanelClass /* Signaux */ - void (* move_request) (GtkViewPanel *, const vmpa2t *); + void (* move_request) (GtkDisplayPanel *, const vmpa2t *); - void (* caret_moved) (GtkViewPanel *, const vmpa2t *); + void (* caret_moved) (GtkDisplayPanel *, const vmpa2t *); }; @@ -126,10 +126,10 @@ typedef enum _ViewPanelProps /* Définit un chemin décrivant la bordure autour du panneau. */ -void gtk_view_panel_define_border_path(GtkViewPanel *, cairo_t *, gint, gint); +void gtk_display_panel_define_border_path(GtkDisplayPanel *, cairo_t *, gint, gint); /* Dessine si besoin est une bordure autour du composant. */ -void gtk_view_panel_draw_border(GtkViewPanel *, cairo_t *); +void gtk_display_panel_draw_border(GtkDisplayPanel *, cairo_t *); @@ -137,14 +137,14 @@ void gtk_view_panel_draw_border(GtkViewPanel *, cairo_t *); /* Transcrit les coordonnées à l'écran en coordonnées absolues. */ -void gtk_view_panel_compute_fake_coord(GtkViewPanel *, gint *, gint *); +void gtk_display_panel_compute_fake_coord(GtkDisplayPanel *, gint *, gint *); /* Transcrit les coordonnées absolues en coordonnées à l'écran. */ -void gtk_view_panel_compute_real_coord(GtkViewPanel *, gint *, gint *); +void gtk_display_panel_compute_real_coord(GtkDisplayPanel *, gint *, gint *); /* Transcrit les coordonnées absolues en coordonnées à l'écran. */ -void gtk_view_panel_compute_relative_coords(GtkViewPanel *, gint *, gint *); +void gtk_display_panel_compute_relative_coords(GtkDisplayPanel *, gint *, gint *); -#endif /* _GTK_VIEWPANEL_INT_H */ +#endif /* _GTK_DISPLAYPANEL_INT_H */ diff --git a/src/gtkext/gtkviewpanel.c b/src/gtkext/gtkdisplaypanel.c index 2751b13..c237924 100644 --- a/src/gtkext/gtkviewpanel.c +++ b/src/gtkext/gtkdisplaypanel.c @@ -1,6 +1,6 @@ /* Chrysalide - Outil d'analyse de fichiers binaires - * gtkviewpanel.c - affichage de contenu de binaire + * gtkdisplaypanel.c - affichage de contenu de binaire * * Copyright (C) 2010-2014 Cyrille Bagard * @@ -21,13 +21,13 @@ */ -#include "gtkviewpanel.h" +#include "gtkdisplaypanel.h" #include <math.h> -#include "gtkviewpanel-int.h" +#include "gtkdisplaypanel-int.h" /* Amplitude de l'arrondi pour les coins */ @@ -35,57 +35,57 @@ /* Procède à l'initialisation de l'afficheur générique. */ -static void gtk_view_panel_class_init(GtkViewPanelClass *); +static void gtk_display_panel_class_init(GtkDisplayPanelClass *); /* Procède à l'initialisation de l'afficheur générique. */ -static void gtk_view_panel_init(GtkViewPanel *); +static void gtk_display_panel_init(GtkDisplayPanel *); /* Définit une propriété du composant d'affichage. */ -static void gtk_view_panel_set_property(GObject *, guint, const GValue *, GParamSpec *); +static void gtk_display_panel_set_property(GObject *, guint, const GValue *, GParamSpec *); /* Fournit une propriété du composant d'affichage. */ -static void gtk_view_panel_get_property(GObject *, guint, GValue *, GParamSpec *); +static void gtk_display_panel_get_property(GObject *, guint, GValue *, GParamSpec *); /* Détruit un composant d'affichage. */ -static void gtk_view_panel_destroy(GtkWidget *); +static void gtk_display_panel_destroy(GtkWidget *); /* Encadre la construction graphique initiale de l'affichage. */ -static void gtk_view_panel_realize(GtkWidget *); +static void gtk_display_panel_realize(GtkWidget *); /* S'adapte à la surface concédée par le composant parent. */ -static void gtk_view_panel_size_allocate(GtkWidget *, GtkAllocation *); +static void gtk_display_panel_size_allocate(GtkWidget *, GtkAllocation *); /* Fournit la hauteur idéale pour le composant d'affichage. */ -static void gtk_view_panel_get_preferred_height(GtkWidget *, gint *, gint *); +static void gtk_display_panel_get_preferred_height(GtkWidget *, gint *, gint *); /* Fournit la largeur idéale pour le composant d'affichage. */ -static void gtk_view_panel_get_preferred_width(GtkWidget *, gint *, gint *); +static void gtk_display_panel_get_preferred_width(GtkWidget *, gint *, gint *); /* Détermine la taille des bonds lors de défilements. */ -static void gtk_view_panel_compute_scroll_inc(GtkViewPanel *, gint, GtkOrientation, gdouble *, gdouble *); +static void gtk_display_panel_compute_scroll_inc(GtkDisplayPanel *, gint, GtkOrientation, gdouble *, gdouble *); /* Détermine la taille allouée pour le contenu. */ -static void gtk_view_panel_compute_allocation(GtkViewPanel *, GtkAllocation *); +static void gtk_display_panel_compute_allocation(GtkDisplayPanel *, GtkAllocation *); /* Se débarrsse d'un ajustement pour un défilement donné. */ -static void gtk_view_panel_disconnect_adjustment(GtkViewPanel *, GtkOrientation); +static void gtk_display_panel_disconnect_adjustment(GtkDisplayPanel *, GtkOrientation); /* S'associe à un ajustement pour un défilement donné. */ -static void gtk_view_panel_set_adjustment(GtkViewPanel *, GtkOrientation, GtkAdjustment *); +static void gtk_display_panel_set_adjustment(GtkDisplayPanel *, GtkOrientation, GtkAdjustment *); /* Ajuste les paramètres de défilement du composant. */ -static void gtk_view_panel_update_adjustment(GtkViewPanel *, GtkOrientation); +static void gtk_display_panel_update_adjustment(GtkDisplayPanel *, GtkOrientation); /* Réagit à un défilement chez une barre associée au composant.*/ -static void gtk_view_panel_adjustment_value_changed(GtkAdjustment *, GtkViewPanel *); +static void gtk_display_panel_adjustment_value_changed(GtkAdjustment *, GtkDisplayPanel *); /* Réagit à un changement des règles d'affichage. */ -static void on_view_panel_binary_display_change(GLoadedBinary *, BinaryView, BufferLineColumn, GtkViewPanel *); +static void on_view_panel_binary_display_change(GLoadedBinary *, BinaryView, BufferLineColumn, GtkDisplayPanel *); /* Détermine le type du composant d'affichage générique. */ -G_DEFINE_TYPE_WITH_CODE(GtkViewPanel, gtk_view_panel, GTK_TYPE_FIXED, +G_DEFINE_TYPE_WITH_CODE(GtkDisplayPanel, gtk_display_panel, GTK_TYPE_FIXED, G_IMPLEMENT_INTERFACE(GTK_TYPE_SCROLLABLE, NULL)) @@ -101,18 +101,18 @@ G_DEFINE_TYPE_WITH_CODE(GtkViewPanel, gtk_view_panel, GTK_TYPE_FIXED, * * ******************************************************************************/ -static void gtk_view_panel_class_init(GtkViewPanelClass *class) +static void gtk_display_panel_class_init(GtkDisplayPanelClass *class) { GObjectClass *gobject_class; /* Plus haut niveau équivalent */ GtkWidgetClass *widget_class; /* Classe de haut niveau */ - GtkViewPanelClass *panel_class; /* Classe de lus bas niveau */ + GtkDisplayPanelClass *panel_class; /* Classe de lus bas niveau */ gobject_class = G_OBJECT_CLASS(class); widget_class = GTK_WIDGET_CLASS(class); - panel_class = GTK_VIEW_PANEL_CLASS(class); + panel_class = GTK_DISPLAY_PANEL_CLASS(class); - gobject_class->set_property = gtk_view_panel_set_property; - gobject_class->get_property = gtk_view_panel_get_property; + gobject_class->set_property = gtk_display_panel_set_property; + gobject_class->get_property = gtk_display_panel_get_property; /* Implémentation de l'interface "GtkScrollable" */ g_object_class_override_property(gobject_class, VPP_HADJUSTMENT, "hadjustment"); @@ -120,26 +120,26 @@ static void gtk_view_panel_class_init(GtkViewPanelClass *class) g_object_class_override_property(gobject_class, VPP_HSCROLL_POLICY, "hscroll-policy"); g_object_class_override_property(gobject_class, VPP_VSCROLL_POLICY, "vscroll-policy"); - widget_class->destroy = gtk_view_panel_destroy; - widget_class->realize = gtk_view_panel_realize; - widget_class->size_allocate = gtk_view_panel_size_allocate; - widget_class->get_preferred_height = gtk_view_panel_get_preferred_height; - widget_class->get_preferred_width = gtk_view_panel_get_preferred_width; + widget_class->destroy = gtk_display_panel_destroy; + widget_class->realize = gtk_display_panel_realize; + widget_class->size_allocate = gtk_display_panel_size_allocate; + widget_class->get_preferred_height = gtk_display_panel_get_preferred_height; + widget_class->get_preferred_width = gtk_display_panel_get_preferred_width; - panel_class->compute_inc = gtk_view_panel_compute_scroll_inc; + panel_class->compute_inc = gtk_display_panel_compute_scroll_inc; g_signal_new("move-request", - GTK_TYPE_VIEW_PANEL, + GTK_TYPE_DISPLAY_PANEL, G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET(GtkViewPanelClass, move_request), + G_STRUCT_OFFSET(GtkDisplayPanelClass, move_request), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); g_signal_new("caret-moved", - GTK_TYPE_VIEW_PANEL, + GTK_TYPE_DISPLAY_PANEL, G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET(GtkViewPanelClass, caret_moved), + G_STRUCT_OFFSET(GtkDisplayPanelClass, caret_moved), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); @@ -149,7 +149,7 @@ static void gtk_view_panel_class_init(GtkViewPanelClass *class) /****************************************************************************** * * -* Paramètres : view = composant GTK à initialiser. * +* Paramètres : panel = composant GTK à initialiser. * * * * Description : Procède à l'initialisation de l'afficheur générique. * * * @@ -159,7 +159,7 @@ static void gtk_view_panel_class_init(GtkViewPanelClass *class) * * ******************************************************************************/ -static void gtk_view_panel_init(GtkViewPanel *panel) +static void gtk_display_panel_init(GtkDisplayPanel *panel) { gtk_widget_set_has_window(GTK_WIDGET(panel), TRUE); gtk_widget_set_can_focus(GTK_WIDGET(panel), TRUE); @@ -182,19 +182,19 @@ static void gtk_view_panel_init(GtkViewPanel *panel) * * ******************************************************************************/ -static void gtk_view_panel_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) +static void gtk_display_panel_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - GtkViewPanel *panel; /* Autre vision de l'instance */ + GtkDisplayPanel *panel; /* Autre vision de l'instance */ - panel = GTK_VIEW_PANEL(object); + panel = GTK_DISPLAY_PANEL(object); switch (prop_id) { case VPP_HADJUSTMENT: - gtk_view_panel_set_adjustment(panel, GTK_ORIENTATION_HORIZONTAL, g_value_get_object(value)); + gtk_display_panel_set_adjustment(panel, GTK_ORIENTATION_HORIZONTAL, g_value_get_object(value)); break; case VPP_VADJUSTMENT: - gtk_view_panel_set_adjustment(panel, GTK_ORIENTATION_VERTICAL, g_value_get_object(value)); + gtk_display_panel_set_adjustment(panel, GTK_ORIENTATION_VERTICAL, g_value_get_object(value)); break; case VPP_HSCROLL_POLICY: //viewport->priv->hscroll_policy = g_value_get_enum (value); @@ -227,11 +227,11 @@ static void gtk_view_panel_set_property(GObject *object, guint prop_id, const GV * * ******************************************************************************/ -static void gtk_view_panel_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) +static void gtk_display_panel_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - GtkViewPanel *panel; /* Autre vision de l'instance */ + GtkDisplayPanel *panel; /* Autre vision de l'instance */ - panel = GTK_VIEW_PANEL(object); + panel = GTK_DISPLAY_PANEL(object); switch (prop_id) { @@ -267,16 +267,16 @@ static void gtk_view_panel_get_property(GObject *object, guint prop_id, GValue * * * ******************************************************************************/ -static void gtk_view_panel_destroy(GtkWidget *widget) +static void gtk_display_panel_destroy(GtkWidget *widget) { - GtkViewPanel *panel; /* Autre version du composant */ + GtkDisplayPanel *panel; /* Autre version du composant */ - panel = GTK_VIEW_PANEL(widget); + panel = GTK_DISPLAY_PANEL(widget); - gtk_view_panel_disconnect_adjustment(panel, GTK_ORIENTATION_HORIZONTAL); - gtk_view_panel_disconnect_adjustment(panel, GTK_ORIENTATION_VERTICAL); + gtk_display_panel_disconnect_adjustment(panel, GTK_ORIENTATION_HORIZONTAL); + gtk_display_panel_disconnect_adjustment(panel, GTK_ORIENTATION_VERTICAL); - GTK_WIDGET_CLASS(gtk_view_panel_parent_class)->destroy(widget); + GTK_WIDGET_CLASS(gtk_display_panel_parent_class)->destroy(widget); } @@ -293,7 +293,7 @@ static void gtk_view_panel_destroy(GtkWidget *widget) * * ******************************************************************************/ -static void gtk_view_panel_realize(GtkWidget *widget) +static void gtk_display_panel_realize(GtkWidget *widget) { GtkAllocation allocation; /* Disposition du composant */ GdkWindowAttr attributes; /* Propriétés du composant */ @@ -341,16 +341,16 @@ static void gtk_view_panel_realize(GtkWidget *widget) * * ******************************************************************************/ -static void gtk_view_panel_size_allocate(GtkWidget *widget, GtkAllocation *allocation) +static void gtk_display_panel_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { - GtkViewPanel *panel; /* Autre version du composant */ + GtkDisplayPanel *panel; /* Autre version du composant */ - GTK_WIDGET_CLASS(gtk_view_panel_parent_class)->size_allocate(widget, allocation); + GTK_WIDGET_CLASS(gtk_display_panel_parent_class)->size_allocate(widget, allocation); - panel = GTK_VIEW_PANEL(widget); + panel = GTK_DISPLAY_PANEL(widget); - gtk_view_panel_update_adjustment(panel, GTK_ORIENTATION_HORIZONTAL); - gtk_view_panel_update_adjustment(panel, GTK_ORIENTATION_VERTICAL); + gtk_display_panel_update_adjustment(panel, GTK_ORIENTATION_HORIZONTAL); + gtk_display_panel_update_adjustment(panel, GTK_ORIENTATION_VERTICAL); } @@ -369,11 +369,11 @@ static void gtk_view_panel_size_allocate(GtkWidget *widget, GtkAllocation *alloc * * ******************************************************************************/ -static void gtk_view_panel_get_preferred_height(GtkWidget *widget, gint *minimum, gint *natural) +static void gtk_display_panel_get_preferred_height(GtkWidget *widget, gint *minimum, gint *natural) { gint req; /* Dimension requise */ - GTK_VIEW_PANEL_GET_CLASS(widget)->compute_size(GTK_VIEW_PANEL(widget), NULL, &req); + GTK_DISPLAY_PANEL_GET_CLASS(widget)->compute_size(GTK_DISPLAY_PANEL(widget), NULL, &req); if (minimum != NULL) *minimum = req; if (natural != NULL) *natural = req; @@ -395,11 +395,11 @@ static void gtk_view_panel_get_preferred_height(GtkWidget *widget, gint *minimum * * ******************************************************************************/ -static void gtk_view_panel_get_preferred_width(GtkWidget *widget, gint *minimum, gint *natural) +static void gtk_display_panel_get_preferred_width(GtkWidget *widget, gint *minimum, gint *natural) { gint req; /* Dimension requise */ - GTK_VIEW_PANEL_GET_CLASS(widget)->compute_size(GTK_VIEW_PANEL(widget), &req, NULL); + GTK_DISPLAY_PANEL_GET_CLASS(widget)->compute_size(GTK_DISPLAY_PANEL(widget), &req, NULL); if (minimum != NULL) *minimum = req; if (natural != NULL) *natural = req; @@ -423,7 +423,7 @@ static void gtk_view_panel_get_preferred_width(GtkWidget *widget, gint *minimum, * * ******************************************************************************/ -static void gtk_view_panel_compute_scroll_inc(GtkViewPanel *panel, gint size, GtkOrientation orientation, gdouble *step, gdouble *page) +static void gtk_display_panel_compute_scroll_inc(GtkDisplayPanel *panel, gint size, GtkOrientation orientation, gdouble *step, gdouble *page) { *step = size * 0.1; *page = size * 0.9; @@ -444,7 +444,7 @@ static void gtk_view_panel_compute_scroll_inc(GtkViewPanel *panel, gint size, Gt * * ******************************************************************************/ -static void gtk_view_panel_compute_allocation(GtkViewPanel *panel, GtkAllocation *alloc) +static void gtk_display_panel_compute_allocation(GtkDisplayPanel *panel, GtkAllocation *alloc) { GtkWidget *widget; /* Autre vision du composant */ GtkAllocation allocation; /* Emplacement du composant */ @@ -513,7 +513,7 @@ static void gtk_view_panel_compute_allocation(GtkViewPanel *panel, GtkAllocation * * ******************************************************************************/ -static void gtk_view_panel_disconnect_adjustment(GtkViewPanel *panel, GtkOrientation orientation) +static void gtk_display_panel_disconnect_adjustment(GtkDisplayPanel *panel, GtkOrientation orientation) { GtkAdjustment **adjp; /* Ajustement à manipuler */ @@ -521,7 +521,7 @@ static void gtk_view_panel_disconnect_adjustment(GtkViewPanel *panel, GtkOrienta if (*adjp != NULL) { - g_signal_handlers_disconnect_by_func(*adjp, gtk_view_panel_adjustment_value_changed, panel); + g_signal_handlers_disconnect_by_func(*adjp, gtk_display_panel_adjustment_value_changed, panel); g_object_unref(G_OBJECT(*adjp)); *adjp = NULL; } @@ -543,7 +543,7 @@ static void gtk_view_panel_disconnect_adjustment(GtkViewPanel *panel, GtkOrienta * * ******************************************************************************/ -static void gtk_view_panel_set_adjustment(GtkViewPanel *panel, GtkOrientation orientation, GtkAdjustment *adj) +static void gtk_display_panel_set_adjustment(GtkDisplayPanel *panel, GtkOrientation orientation, GtkAdjustment *adj) { GtkAdjustment **adjp; /* Ajustement à manipuler */ @@ -556,16 +556,16 @@ static void gtk_view_panel_set_adjustment(GtkViewPanel *panel, GtkOrientation or if (!adj) adj = gtk_adjustment_new(0.0, 0.0, 0.0, 0.0, 0.0, 0.0); - gtk_view_panel_disconnect_adjustment(panel, orientation); + gtk_display_panel_disconnect_adjustment(panel, orientation); *adjp = adj; g_object_ref_sink(adj); - gtk_view_panel_update_adjustment(panel, orientation); + gtk_display_panel_update_adjustment(panel, orientation); - g_signal_connect(adj, "value-changed", G_CALLBACK(gtk_view_panel_adjustment_value_changed), panel); + g_signal_connect(adj, "value-changed", G_CALLBACK(gtk_display_panel_adjustment_value_changed), panel); - gtk_view_panel_adjustment_value_changed(adj, panel); + gtk_display_panel_adjustment_value_changed(adj, panel); } @@ -583,7 +583,7 @@ static void gtk_view_panel_set_adjustment(GtkViewPanel *panel, GtkOrientation or * * ******************************************************************************/ -static void gtk_view_panel_update_adjustment(GtkViewPanel *panel, GtkOrientation orientation) +static void gtk_display_panel_update_adjustment(GtkDisplayPanel *panel, GtkOrientation orientation) { GtkAllocation allocation; /* Emplacement du contenu */ GtkAdjustment *adj; /* Ajustement à manipuler */ @@ -592,13 +592,13 @@ static void gtk_view_panel_update_adjustment(GtkViewPanel *panel, GtkOrientation gdouble step_inc; /* Pas de défilement */ gdouble page_inc; /* ENjambée de défilement */ - gtk_view_panel_compute_allocation(panel, &allocation); + gtk_display_panel_compute_allocation(panel, &allocation); if (orientation == GTK_ORIENTATION_HORIZONTAL) { adj = panel->hadjustment; - GTK_VIEW_PANEL_GET_CLASS(panel)->compute_size(panel, &req, NULL); + GTK_DISPLAY_PANEL_GET_CLASS(panel)->compute_size(panel, &req, NULL); allocated = allocation.width; } @@ -606,12 +606,12 @@ static void gtk_view_panel_update_adjustment(GtkViewPanel *panel, GtkOrientation { adj = panel->vadjustment; - GTK_VIEW_PANEL_GET_CLASS(panel)->compute_size(panel, NULL, &req); + GTK_DISPLAY_PANEL_GET_CLASS(panel)->compute_size(panel, NULL, &req); allocated = allocation.height; } - GTK_VIEW_PANEL_GET_CLASS(panel)->compute_inc(panel, allocated, orientation, &step_inc, &page_inc); + GTK_DISPLAY_PANEL_GET_CLASS(panel)->compute_inc(panel, allocated, orientation, &step_inc, &page_inc); gtk_adjustment_configure(adj, gtk_adjustment_get_value(adj), 0, MAX(req, allocated), @@ -635,13 +635,13 @@ static void gtk_view_panel_update_adjustment(GtkViewPanel *panel, GtkOrientation * * ******************************************************************************/ -static void gtk_view_panel_adjustment_value_changed(GtkAdjustment *adj, GtkViewPanel *panel) +static void gtk_display_panel_adjustment_value_changed(GtkAdjustment *adj, GtkDisplayPanel *panel) { GtkOrientation orientation; /* Indification de la barre */ orientation = (adj == panel->hadjustment ? GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL); - GTK_VIEW_PANEL_GET_CLASS(panel)->adjust(panel, adj, orientation); + GTK_DISPLAY_PANEL_GET_CLASS(panel)->adjust(panel, adj, orientation); } @@ -658,7 +658,7 @@ static void gtk_view_panel_adjustment_value_changed(GtkAdjustment *adj, GtkViewP * * ******************************************************************************/ -BinaryView gtk_view_panel_describe_content(const GtkViewPanel *panel) +BinaryView gtk_display_panel_describe_content(const GtkDisplayPanel *panel) { return panel->content; @@ -678,7 +678,7 @@ BinaryView gtk_view_panel_describe_content(const GtkViewPanel *panel) * * ******************************************************************************/ -void gtk_view_panel_show_border(GtkViewPanel *panel, bool show) +void gtk_display_panel_show_border(GtkDisplayPanel *panel, bool show) { panel->show_border = show; @@ -699,7 +699,7 @@ void gtk_view_panel_show_border(GtkViewPanel *panel, bool show) * * ******************************************************************************/ -void gtk_view_panel_define_border_path(GtkViewPanel *panel, cairo_t *cr, gint off_x, gint off_y) +void gtk_display_panel_define_border_path(GtkDisplayPanel *panel, cairo_t *cr, gint off_x, gint off_y) { GtkRequisition req; /* Taille allouée à l'élément */ double degrees; /* Conversion en degrés */ @@ -748,7 +748,7 @@ void gtk_view_panel_define_border_path(GtkViewPanel *panel, cairo_t *cr, gint of * * ******************************************************************************/ -void gtk_view_panel_draw_border(GtkViewPanel *panel, cairo_t *cr) +void gtk_display_panel_draw_border(GtkDisplayPanel *panel, cairo_t *cr) { GtkWidget *widget; /* Autre version du composant */ GtkRequisition req; /* Taille allouée à l'élément */ @@ -773,7 +773,7 @@ void gtk_view_panel_draw_border(GtkViewPanel *panel, cairo_t *cr) cairo_set_line_width(cr, 1.0); - gtk_view_panel_define_border_path(panel, cr, 0, 0); + gtk_display_panel_define_border_path(panel, cr, 0, 0); cairo_stroke(cr); gtk_style_context_restore(context); @@ -797,7 +797,7 @@ void gtk_view_panel_draw_border(GtkViewPanel *panel, cairo_t *cr) * * ******************************************************************************/ -void gtk_view_panel_attach_binary(GtkViewPanel *panel, GLoadedBinary *binary, BinaryView view) +void gtk_display_panel_attach_binary(GtkDisplayPanel *panel, GLoadedBinary *binary, BinaryView view) { g_object_ref(G_OBJECT(binary)); panel->binary = binary; @@ -805,8 +805,8 @@ void gtk_view_panel_attach_binary(GtkViewPanel *panel, GLoadedBinary *binary, Bi panel->content = view; panel->display = g_loaded_binary_get_column_display(binary, view); - if (GTK_VIEW_PANEL_GET_CLASS(panel)->attach != NULL) /* REMME */ - GTK_VIEW_PANEL_GET_CLASS(panel)->attach(panel, binary); + if (GTK_DISPLAY_PANEL_GET_CLASS(panel)->attach != NULL) /* REMME */ + GTK_DISPLAY_PANEL_GET_CLASS(panel)->attach(panel, binary); g_signal_connect(binary, "display-changed", G_CALLBACK(on_view_panel_binary_display_change), panel); @@ -828,7 +828,7 @@ void gtk_view_panel_attach_binary(GtkViewPanel *panel, GLoadedBinary *binary, Bi * * ******************************************************************************/ -static void on_view_panel_binary_display_change(GLoadedBinary *binary, BinaryView view, BufferLineColumn col, GtkViewPanel *panel) +static void on_view_panel_binary_display_change(GLoadedBinary *binary, BinaryView view, BufferLineColumn col, GtkDisplayPanel *panel) { if (panel->content == view) { @@ -856,7 +856,7 @@ static void on_view_panel_binary_display_change(GLoadedBinary *binary, BinaryVie * * ******************************************************************************/ -GLoadedBinary *gtk_view_panel_get_binary(const GtkViewPanel *panel) +GLoadedBinary *gtk_display_panel_get_binary(const GtkDisplayPanel *panel) { /* TODO : ref */ @@ -886,11 +886,11 @@ GLoadedBinary *gtk_view_panel_get_binary(const GtkViewPanel *panel) * * ******************************************************************************/ -const vmpa2t *gtk_view_panel_get_caret_location(const GtkViewPanel *panel) +const vmpa2t *gtk_display_panel_get_caret_location(const GtkDisplayPanel *panel) { const vmpa2t *result; /* Adresse à retourner */ - result = GTK_VIEW_PANEL_GET_CLASS(panel)->get_caret_loc(panel); + result = GTK_DISPLAY_PANEL_GET_CLASS(panel)->get_caret_loc(panel); return result; @@ -912,7 +912,7 @@ const vmpa2t *gtk_view_panel_get_caret_location(const GtkViewPanel *panel) * * ******************************************************************************/ -void _gtk_view_panel_scroll_to_address(GtkViewPanel *panel, const vmpa2t *addr, ScrollPositionTweak tweak, bool move) +void _gtk_display_panel_scroll_to_address(GtkDisplayPanel *panel, const vmpa2t *addr, ScrollPositionTweak tweak, bool move) { GtkWidget *parent; /* Support parent à valider */ gint x; /* Abscisse à garantir */ @@ -934,18 +934,18 @@ void _gtk_view_panel_scroll_to_address(GtkViewPanel *panel, const vmpa2t *addr, printf(" Widgets : %s -> %s\n", G_OBJECT_TYPE_NAME(parent), G_OBJECT_TYPE_NAME(panel)); - if (GTK_IS_VIEW_PANEL(parent)) + if (GTK_IS_DISPLAY_PANEL(parent)) { printf("reparent !\n"); - panel = GTK_VIEW_PANEL(parent); + panel = GTK_DISPLAY_PANEL(parent); } else printf("no need reparent !\n"); - if (GTK_VIEW_PANEL_GET_CLASS(panel)->define != NULL) - GTK_VIEW_PANEL_GET_CLASS(panel)->define(panel, addr); + if (GTK_DISPLAY_PANEL_GET_CLASS(panel)->define != NULL) + GTK_DISPLAY_PANEL_GET_CLASS(panel)->define(panel, addr); - if (GTK_VIEW_PANEL_GET_CLASS(panel)->get_coordinates(panel, addr, &x, &y, tweak)) + if (GTK_DISPLAY_PANEL_GET_CLASS(panel)->get_coordinates(panel, addr, &x, &y, tweak)) { viewport = gtk_widget_get_parent(GTK_WIDGET(panel)); @@ -979,8 +979,8 @@ void _gtk_view_panel_scroll_to_address(GtkViewPanel *panel, const vmpa2t *addr, /* Déplacement du curseur */ - if (move && GTK_VIEW_PANEL_GET_CLASS(panel)->get_coordinates(panel, addr, &x, &y, SPT_RAW)) - GTK_VIEW_PANEL_GET_CLASS(panel)->move_caret_to(panel, x, y); + if (move && GTK_DISPLAY_PANEL_GET_CLASS(panel)->get_coordinates(panel, addr, &x, &y, SPT_RAW)) + GTK_DISPLAY_PANEL_GET_CLASS(panel)->move_caret_to(panel, x, y); } @@ -1000,7 +1000,7 @@ void _gtk_view_panel_scroll_to_address(GtkViewPanel *panel, const vmpa2t *addr, * * ******************************************************************************/ -void gtk_view_panel_request_move(GtkViewPanel *panel, const vmpa2t *addr) +void gtk_display_panel_request_move(GtkDisplayPanel *panel, const vmpa2t *addr) { g_signal_emit_by_name(panel, "move-request", addr); @@ -1021,17 +1021,17 @@ void gtk_view_panel_request_move(GtkViewPanel *panel, const vmpa2t *addr) * * ******************************************************************************/ -bool gtk_view_panel_get_position(const GtkViewPanel *panel, GBufferLine **line, GObject **creator) +bool gtk_display_panel_get_position(const GtkDisplayPanel *panel, GBufferLine **line, GObject **creator) { bool result; /* Bilan de l'opération */ *line = NULL; if (creator != NULL) *creator = NULL; - if (GTK_VIEW_PANEL_GET_CLASS(panel)->get_position == NULL) + if (GTK_DISPLAY_PANEL_GET_CLASS(panel)->get_position == NULL) return false; - result = GTK_VIEW_PANEL_GET_CLASS(panel)->get_position(panel, line, creator); + result = GTK_DISPLAY_PANEL_GET_CLASS(panel)->get_position(panel, line, creator); if (result) { @@ -1062,10 +1062,10 @@ bool gtk_view_panel_get_position(const GtkViewPanel *panel, GBufferLine **line, * * ******************************************************************************/ -void gtk_view_panel_cache_glance(GtkViewPanel *panel, cairo_t *cairo, const GtkAllocation *area, double scale) +void gtk_display_panel_cache_glance(GtkDisplayPanel *panel, cairo_t *cairo, const GtkAllocation *area, double scale) { - if (GTK_VIEW_PANEL_GET_CLASS(panel)->cache_glance != NULL) - GTK_VIEW_PANEL_GET_CLASS(panel)->cache_glance(panel, cairo, area, scale); + if (GTK_DISPLAY_PANEL_GET_CLASS(panel)->cache_glance != NULL) + GTK_DISPLAY_PANEL_GET_CLASS(panel)->cache_glance(panel, cairo, area, scale); } @@ -1089,7 +1089,7 @@ void gtk_view_panel_cache_glance(GtkViewPanel *panel, cairo_t *cairo, const GtkA * * ******************************************************************************/ -void gtk_view_panel_compute_fake_coord(GtkViewPanel *panel, gint *x, gint *y) +void gtk_display_panel_compute_fake_coord(GtkDisplayPanel *panel, gint *x, gint *y) { if (panel->hadjustment != NULL) *x -= gtk_adjustment_get_value(panel->hadjustment); @@ -1113,7 +1113,7 @@ void gtk_view_panel_compute_fake_coord(GtkViewPanel *panel, gint *x, gint *y) * * ******************************************************************************/ -void gtk_view_panel_compute_real_coord(GtkViewPanel *panel, gint *x, gint *y) +void gtk_display_panel_compute_real_coord(GtkDisplayPanel *panel, gint *x, gint *y) { if (x != NULL && panel->hadjustment != NULL) *x += gtk_adjustment_get_value(panel->hadjustment); @@ -1138,7 +1138,7 @@ void gtk_view_panel_compute_real_coord(GtkViewPanel *panel, gint *x, gint *y) * * ******************************************************************************/ -void gtk_view_panel_compute_relative_coords(GtkViewPanel *panel, gint *x, gint *y) +void gtk_display_panel_compute_relative_coords(GtkDisplayPanel *panel, gint *x, gint *y) { if (x != NULL && panel->hadjustment != NULL) *x -= gtk_adjustment_get_value(panel->hadjustment); diff --git a/src/gtkext/gtkviewpanel.h b/src/gtkext/gtkdisplaypanel.h index 904fd44..b12c87b 100644 --- a/src/gtkext/gtkviewpanel.h +++ b/src/gtkext/gtkdisplaypanel.h @@ -1,6 +1,6 @@ /* Chrysalide - Outil d'analyse de fichiers binaires - * gtkviewpanel.h - prototypes pour l'affichage de contenu de binaire + * gtkdisplaypanel.h - prototypes pour l'affichage de contenu de binaire * * Copyright (C) 2010-2013 Cyrille Bagard * @@ -21,8 +21,8 @@ */ -#ifndef _GTK_VIEWPANEL_H -#define _GTK_VIEWPANEL_H +#ifndef _GTK_DISPLAYPANEL_H +#define _GTK_DISPLAYPANEL_H #include <glib-object.h> @@ -32,41 +32,41 @@ -#define GTK_TYPE_VIEW_PANEL (gtk_view_panel_get_type()) -#define GTK_VIEW_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_VIEW_PANEL, GtkViewPanel)) -#define GTK_VIEW_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_VIEW_PANEL, GtkViewPanelClass)) -#define GTK_IS_VIEW_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_VIEW_PANEL)) -#define GTK_IS_VIEW_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_VIEW_PANEL)) -#define GTK_VIEW_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_VIEW_PANEL, GtkViewPanelClass)) +#define GTK_TYPE_DISPLAY_PANEL (gtk_display_panel_get_type()) +#define GTK_DISPLAY_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_DISPLAY_PANEL, GtkDisplayPanel)) +#define GTK_DISPLAY_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_DISPLAY_PANEL, GtkDisplayPanelClass)) +#define GTK_IS_DISPLAY_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_DISPLAY_PANEL)) +#define GTK_IS_DISPLAY_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_DISPLAY_PANEL)) +#define GTK_DISPLAY_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_DISPLAY_PANEL, GtkDisplayPanelClass)) /* Composant d'affichage générique (instance) */ -typedef struct _GtkViewPanel GtkViewPanel; +typedef struct _GtkDisplayPanel GtkDisplayPanel; /* Composant d'affichage générique (classe) */ -typedef struct _GtkViewPanelClass GtkViewPanelClass; +typedef struct _GtkDisplayPanelClass GtkDisplayPanelClass; /* Détermine le type du composant d'affichage générique. */ -GType gtk_view_panel_get_type(void); +GType gtk_display_panel_get_type(void); /* Indique le type de contenu représenté par le composant. */ -BinaryView gtk_view_panel_describe_content(const GtkViewPanel *); +BinaryView gtk_display_panel_describe_content(const GtkDisplayPanel *); /* Définit si une bordure est à afficher. */ -void gtk_view_panel_show_border(GtkViewPanel *, bool); +void gtk_display_panel_show_border(GtkDisplayPanel *, bool); /* Associe à un panneau d'affichage un binaire chargé. */ -void gtk_view_panel_attach_binary(GtkViewPanel *, GLoadedBinary *, BinaryView); +void gtk_display_panel_attach_binary(GtkDisplayPanel *, GLoadedBinary *, BinaryView); /* Définit si les adresses doivent apparaître dans le rendu. */ -void gtk_view_panel_set_addresses_display(GtkViewPanel *, bool); +void gtk_display_panel_set_addresses_display(GtkDisplayPanel *, bool); /* Définit si le code doit apparaître dans le rendu. */ -void gtk_view_panel_set_code_display(GtkViewPanel *, bool); +void gtk_display_panel_set_code_display(GtkDisplayPanel *, bool); /* Fournit le binaire associé à la représentation. */ -GLoadedBinary *gtk_view_panel_get_binary(const GtkViewPanel *); +GLoadedBinary *gtk_display_panel_get_binary(const GtkDisplayPanel *); @@ -82,24 +82,24 @@ typedef enum _ScrollPositionTweak } ScrollPositionTweak; /* Indique la position courante du curseur. */ -const vmpa2t *gtk_view_panel_get_caret_location(const GtkViewPanel *); +const vmpa2t *gtk_display_panel_get_caret_location(const GtkDisplayPanel *); /* S'assure qu'une adresse donnée est visible à l'écran. */ -void _gtk_view_panel_scroll_to_address(GtkViewPanel *, const vmpa2t *, ScrollPositionTweak, bool); +void _gtk_display_panel_scroll_to_address(GtkDisplayPanel *, const vmpa2t *, ScrollPositionTweak, bool); -#define gtk_view_panel_scroll_to_address(p, a, t) _gtk_view_panel_scroll_to_address(p, a, t, true) +#define gtk_display_panel_scroll_to_address(p, a, t) _gtk_display_panel_scroll_to_address(p, a, t, true) /* Demande à qui veut répondre un déplacement du curseur. */ -void gtk_view_panel_request_move(GtkViewPanel *, const vmpa2t *); +void gtk_display_panel_request_move(GtkDisplayPanel *, const vmpa2t *); /* Fournit des éléments liés à la position courante dans la vue. */ -bool gtk_view_panel_get_position(const GtkViewPanel *, GBufferLine **, GObject **); +bool gtk_display_panel_get_position(const GtkDisplayPanel *, GBufferLine **, GObject **); /* Place en cache un rendu destiné à l'aperçu graphique rapide. */ -void gtk_view_panel_cache_glance(GtkViewPanel *, cairo_t *, const GtkAllocation *, double); +void gtk_display_panel_cache_glance(GtkDisplayPanel *, cairo_t *, const GtkAllocation *, double); -#endif /* _GTK_VIEWPANEL_H */ +#endif /* _GTK_DISPLAYPANEL_H */ diff --git a/src/gtkext/gtkdockstation.c b/src/gtkext/gtkdockstation.c index e96fdc2..1b25976 100644 --- a/src/gtkext/gtkdockstation.c +++ b/src/gtkext/gtkdockstation.c @@ -259,7 +259,7 @@ static gboolean gtk_dock_station_switch_panel(GtkNotebook *notebook, gpointer *p * Remarques : - * * * ******************************************************************************/ -#include "gtkviewpanel.h" +#include "gtkdisplaypanel.h" #include "../gui/panels/history.h" void gtk_dock_station_add_dockable(GtkDockStation *station, GtkDockable *dockable) { diff --git a/src/gtkext/gtkgraphview.c b/src/gtkext/gtkgraphview.c index fc307a2..469bc46 100644 --- a/src/gtkext/gtkgraphview.c +++ b/src/gtkext/gtkgraphview.c @@ -29,7 +29,7 @@ #include "gtkblockview.h" #include "gtkbufferview.h" -#include "gtkviewpanel-int.h" +#include "gtkdisplaypanel-int.h" #include "graph/cluster.h" #include "../analysis/blocks/flow.h" #include "../gui/editem.h" @@ -39,7 +39,7 @@ /* Composant d'affichage sous forme graphique (instance) */ struct _GtkGraphView { - GtkViewPanel parent; /* A laisser en premier */ + GtkDisplayPanel parent; /* A laisser en premier */ GtkWidget *support; /* Support des vues en bloc */ GtkWidget *extender; /* Force la taille du support */ @@ -67,7 +67,7 @@ struct _GtkGraphView /* Composant d'affichage sous forme graphique (classe) */ struct _GtkGraphViewClass { - GtkViewPanelClass parent; /* A laisser en premier */ + GtkDisplayPanelClass parent; /* A laisser en premier */ }; @@ -145,7 +145,7 @@ static void gtk_graph_view_reach_caret_limit(GtkBufferView *, GdkScrollDirection /* Détermine le type du composant d'affichage en graphique. */ -G_DEFINE_TYPE(GtkGraphView, gtk_graph_view, GTK_TYPE_VIEW_PANEL) +G_DEFINE_TYPE(GtkGraphView, gtk_graph_view, GTK_TYPE_DISPLAY_PANEL) /****************************************************************************** @@ -164,7 +164,7 @@ static void gtk_graph_view_class_init(GtkGraphViewClass *class) { GObjectClass *object; /* Autre version de la classe */ GtkWidgetClass *widget_class; /* Classe de haut niveau */ - GtkViewPanelClass *panel_class; /* Classe parente */ + GtkDisplayPanelClass *panel_class; /* Classe parente */ object = G_OBJECT_CLASS(class); @@ -175,7 +175,7 @@ static void gtk_graph_view_class_init(GtkGraphViewClass *class) widget_class->size_allocate = gtk_graph_view_size_allocate; - panel_class = GTK_VIEW_PANEL_CLASS(class); + panel_class = GTK_DISPLAY_PANEL_CLASS(class); panel_class->compute_size = (compute_requested_size_fc)gtk_graph_view_compute_requested_size; panel_class->adjust = (adjust_scroll_value_fc)gtk_graph_view_adjust_scroll_value; @@ -203,12 +203,12 @@ static void gtk_graph_view_class_init(GtkGraphViewClass *class) static void gtk_graph_view_init(GtkGraphView *view) { - GtkViewPanel *viewpanel; /* Instance parente #1 */ + GtkDisplayPanel *panel; /* Instance parente #1 */ //GtkBinView *binview; /* Instance parente #2 */ - viewpanel = GTK_VIEW_PANEL(view); + panel = GTK_DISPLAY_PANEL(view); - viewpanel->resize = (prepare_resize_fc)gtk_graph_view_prepare_resize; + panel->resize = (prepare_resize_fc)gtk_graph_view_prepare_resize; ////////viewpanel->get_coordinates = (get_addr_coordinates_fc)gtk_graph_view_get_address_coordinates; //binview = GTK_BIN_VIEW(view); @@ -426,7 +426,7 @@ static void gtk_graph_view_adjust_scroll_value(GtkGraphView *view, GtkAdjustment fake_x = 0; fake_y = 0; - gtk_view_panel_compute_fake_coord(GTK_VIEW_PANEL(view), &fake_x, &fake_y); + gtk_display_panel_compute_fake_coord(GTK_DISPLAY_PANEL(view), &fake_x, &fake_y); gtk_fixed_move(GTK_FIXED(view), view->support, fake_x, -fake_y); @@ -463,13 +463,13 @@ static gboolean gtk_graph_view_draw(GtkWidget *widget, cairo_t *cr, GtkGraphView { cairo_push_group(cr); - gtk_view_panel_define_border_path(GTK_VIEW_PANEL(child), cr, alloc.x + j, alloc.y + j); + gtk_display_panel_define_border_path(GTK_DISPLAY_PANEL(child), cr, alloc.x + j, alloc.y + j); cairo_set_source_rgba(cr, 0.0, 0.0, 0.0, 1.0); cairo_fill(cr); cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); - gtk_view_panel_define_border_path(GTK_VIEW_PANEL(child), cr, alloc.x, alloc.y); + gtk_display_panel_define_border_path(GTK_DISPLAY_PANEL(child), cr, alloc.x, alloc.y); cairo_set_source_rgba(cr, 0.0, 0.0, 0.0, 0.0); cairo_fill(cr); @@ -657,7 +657,7 @@ static void gtk_graph_view_prepare_resize(GtkGraphView *view) g_graph_layout_place(view->layout, view); */ - change_editor_items_current_view_content(GTK_VIEW_PANEL(view)); + change_editor_items_current_view_content(GTK_DISPLAY_PANEL(view)); } @@ -701,7 +701,7 @@ static void gtk_graph_view_define_main_address(GtkGraphView *view, const vmpa2t { gtk_graph_view_reset(view); - format = g_loaded_binary_get_format(GTK_VIEW_PANEL(view)->binary); + format = g_loaded_binary_get_format(GTK_DISPLAY_PANEL(view)->binary); routines = g_binary_format_get_routines(G_BIN_FORMAT(format), &routines_count); for (i = 0; i < routines_count; i++) @@ -716,7 +716,7 @@ static void gtk_graph_view_define_main_address(GtkGraphView *view, const vmpa2t view->highlighted = init_segment_content_list(); /* - view->children = gtk_graph_view_load_nodes(view, GTK_VIEW_PANEL(view)->binary, + view->children = gtk_graph_view_load_nodes(view, GTK_DISPLAY_PANEL(view)->binary, routines[i]); view->allocs = (GtkAllocation *)calloc(view->children_count, @@ -736,12 +736,12 @@ static void gtk_graph_view_define_main_address(GtkGraphView *view, const vmpa2t list = g_binary_routine_get_basic_blocks(routines[i]); #if 0 - view->cluster = g_graph_cluster_new(GTK_VIEW_PANEL(view)->binary, + view->cluster = g_graph_cluster_new(GTK_DISPLAY_PANEL(view)->binary, list, 0/* FIXME */, view->highlighted); #endif - view->cluster = bootstrap_graph_cluster(GTK_VIEW_PANEL(view)->binary, + view->cluster = bootstrap_graph_cluster(GTK_DISPLAY_PANEL(view)->binary, list, view->highlighted); @@ -780,7 +780,7 @@ static void gtk_graph_view_define_main_address(GtkGraphView *view, const vmpa2t } - change_editor_items_current_view_content(GTK_VIEW_PANEL(view)); + change_editor_items_current_view_content(GTK_DISPLAY_PANEL(view)); g_object_unref(G_OBJECT(format)); @@ -851,7 +851,7 @@ static bool gtk_graph_view_move_caret_to(GtkGraphView *view, gint x, gint y) { bool result; /* Bilan à retourner */ size_t i; /* Boucle de parcours */ - GtkViewPanel *pview; /* Autre vision d'enfance */ + GtkDisplayPanel *panel; /* Autre vision d'enfance */ gint sub_x; /* Abscisse relative à l'enfant*/ gint sub_y; /* Ordonnée relative à l'enfant*/ @@ -862,12 +862,12 @@ static bool gtk_graph_view_move_caret_to(GtkGraphView *view, gint x, gint y) if (x < view->allocs[i].x || x >= (view->allocs[i].x + view->allocs[i].width)) continue; if (y < view->allocs[i].y || y >= (view->allocs[i].y + view->allocs[i].height)) continue; - pview = GTK_VIEW_PANEL(view->children[i]); + panel = GTK_DISPLAY_PANEL(view->children[i]); sub_x = x - view->allocs[i].x; sub_y = y - view->allocs[i].y; - result = GTK_VIEW_PANEL_GET_CLASS(pview)->move_caret_to(pview, sub_x, sub_y); + result = GTK_DISPLAY_PANEL_GET_CLASS(panel)->move_caret_to(panel, sub_x, sub_y); break; } @@ -904,7 +904,7 @@ static void gtk_graph_view_cache_glance(GtkGraphView *view, cairo_t *cairo, cons sub_area.width = view->allocs[i].width * scale + 1; sub_area.height = view->allocs[i].height * scale + 1; - gtk_view_panel_cache_glance(GTK_VIEW_PANEL(view->children[i]), cairo, &sub_area, scale); + gtk_display_panel_cache_glance(GTK_DISPLAY_PANEL(view->children[i]), cairo, &sub_area, scale); } @@ -1140,9 +1140,9 @@ static GtkBufferView **gtk_graph_view_load_nodes(GtkGraphView *view, GLoadedBina g_signal_connect(result[i], "highlight-changed", G_CALLBACK(gtk_graph_view_changed_highlights), view); gtk_widget_show(GTK_WIDGET(result[i])); - gtk_view_panel_attach_binary(GTK_VIEW_PANEL(result[i]), binary, BVW_GRAPH); + gtk_display_panel_attach_binary(GTK_DISPLAY_PANEL(result[i]), binary, BVW_GRAPH); - gtk_view_panel_show_border(GTK_VIEW_PANEL(result[i]), true); + gtk_display_panel_show_border(GTK_DISPLAY_PANEL(result[i]), true); g_flow_block_get_boundary_addresses(G_FLOW_BLOCK(blocks[i]), &first, &last); @@ -1222,7 +1222,7 @@ static void gtk_graph_view_reach_caret_limit(GtkBufferView *node, GdkScrollDirec range = g_binary_routine_get_range(view->routine); - proc = g_loaded_binary_get_processor(GTK_VIEW_PANEL(view)->binary); + proc = g_loaded_binary_get_processor(GTK_DISPLAY_PANEL(view)->binary); ref = NULL; diff --git a/src/gtkext/gtksourceview.c b/src/gtkext/gtksourceview.c index 92b40bf..0d2670b 100644 --- a/src/gtkext/gtksourceview.c +++ b/src/gtkext/gtksourceview.c @@ -80,9 +80,9 @@ G_DEFINE_TYPE(GtkSourceView, gtk_source_view, GTK_TYPE_BUFFER_VIEW) static void gtk_source_view_class_init(GtkSourceViewClass *class) { - GtkViewPanelClass *panel_class; /* Classe parente */ + GtkDisplayPanelClass *panel_class; /* Classe parente */ - panel_class = GTK_VIEW_PANEL_CLASS(class); + panel_class = GTK_DISPLAY_PANEL_CLASS(class); panel_class->attach = (attach_binary_fc)gtk_source_view_attach_binary; diff --git a/src/gui/editem-int.h b/src/gui/editem-int.h index 3a69261..919e8ae 100644 --- a/src/gui/editem-int.h +++ b/src/gui/editem-int.h @@ -34,7 +34,7 @@ #include "../common/dllist.h" #include "../gtkext/gtkbufferview.h" -#include "../gtkext/gtkviewpanel.h" +#include "../gtkext/gtkdisplaypanel.h" @@ -42,13 +42,13 @@ typedef void (* update_item_binary_fc) (GEditorItem *, GLoadedBinary *); /* Réagit à un changement d'affichage principal de contenu. */ -typedef void (* update_item_view_fc) (GEditorItem *, GtkViewPanel *); +typedef void (* update_item_view_fc) (GEditorItem *, GtkDisplayPanel *); /* Réagit à un changement de focus des panneaux d'affichage. */ -typedef void (* notify_focus_change_fc) (GEditorItem *, GtkViewPanel *); +typedef void (* notify_focus_change_fc) (GEditorItem *, GtkDisplayPanel *); /* Suit les changements de position dans du code d'assembleur. */ -typedef void (* track_caret_in_view_fc) (GEditorItem *, GtkViewPanel *, const vmpa2t *); +typedef void (* track_caret_in_view_fc) (GEditorItem *, GtkDisplayPanel *, const vmpa2t *); /* Concentre l'attention de l'ensemble sur une adresse donnée. */ typedef void (* focus_addr_fc) (GEditorItem *, GLoadedBinary *, const vmpa2t *); diff --git a/src/gui/editem.c b/src/gui/editem.c index 417208e..a2d1210 100644 --- a/src/gui/editem.c +++ b/src/gui/editem.c @@ -49,20 +49,20 @@ static void g_editor_item_init(GEditorItem *); static GEditorItem *_editem_list = NULL; /* Suivi du panneau d'affichage courant */ -static GtkViewPanel *_current_view = NULL; +static GtkDisplayPanel *_current_view = NULL; /* Suivi des changements de position */ static GObject *_caret_instance = NULL; /* Suit les changements de focus des panneaux d'affichage. */ -static gboolean notify_view_panel_focus_change(GtkViewPanel *, GdkEventFocus *, void *); +static gboolean notify_view_panel_focus_change(GtkDisplayPanel *, GdkEventFocus *, void *); /* Lance une procédure de déplacement de la position courante. */ -static void start_moving_to_address_in_view_panel(GtkViewPanel *, const vmpa2t *, void *); +static void start_moving_to_address_in_view_panel(GtkDisplayPanel *, const vmpa2t *, void *); /* Suit les changements de position dans du code d'assembleur. */ -static void track_caret_address_on_view_panel(GtkViewPanel *, const vmpa2t *, void *); +static void track_caret_address_on_view_panel(GtkDisplayPanel *, const vmpa2t *, void *); @@ -200,7 +200,7 @@ GLoadedBinary *g_editor_item_get_current_binary(const GEditorItem *item) * * ******************************************************************************/ -GtkViewPanel *g_editor_item_get_current_view(const GEditorItem *item) +GtkDisplayPanel *g_editor_item_get_current_view(const GEditorItem *item) { return _current_view; @@ -266,9 +266,9 @@ void change_editor_items_current_binary(GObject *ref, GLoadedBinary *binary) /****************************************************************************** * * -* Paramètres : vpanel = composant d'affichage concerné par l'opération. * -* event = informations liées à l'événement. * -* data = adresse non utilisée ici. * +* Paramètres : panel = composant d'affichage concerné par l'opération. * +* event = informations liées à l'événement. * +* data = adresse non utilisée ici. * * * * Description : Suit les changements de focus des panneaux d'affichage. * * * @@ -278,7 +278,7 @@ void change_editor_items_current_binary(GObject *ref, GLoadedBinary *binary) * * ******************************************************************************/ -static gboolean notify_view_panel_focus_change(GtkViewPanel *vpanel, GdkEventFocus *event, void *data) +static gboolean notify_view_panel_focus_change(GtkDisplayPanel *panel, GdkEventFocus *event, void *data) { GEditorItem *iter; /* Boucle de parcours */ GEditorItemClass *klass; /* Classe correspondante */ @@ -288,7 +288,7 @@ static gboolean notify_view_panel_focus_change(GtkViewPanel *vpanel, GdkEventFoc klass = G_EDITOR_ITEM_GET_CLASS(iter); if (klass->notify_focus != NULL) - klass->notify_focus(iter, event->in ? vpanel : NULL); + klass->notify_focus(iter, event->in ? panel : NULL); } @@ -299,9 +299,9 @@ static gboolean notify_view_panel_focus_change(GtkViewPanel *vpanel, GdkEventFoc /****************************************************************************** * * -* Paramètres : vpanel = composant d'affichage parcouru. * -* addr = adresse de destination du curseur souhaitée. * -* data = adresse non utilisée ici. * +* Paramètres : panel = composant d'affichage parcouru. * +* addr = adresse de destination du curseur souhaitée. * +* data = adresse non utilisée ici. * * * * Description : Lance une procédure de déplacement de la position courante. * * * @@ -311,23 +311,23 @@ static gboolean notify_view_panel_focus_change(GtkViewPanel *vpanel, GdkEventFoc * * ******************************************************************************/ -static void start_moving_to_address_in_view_panel(GtkViewPanel *vpanel, const vmpa2t *addr, void *data) +static void start_moving_to_address_in_view_panel(GtkDisplayPanel *panel, const vmpa2t *addr, void *data) { const vmpa2t *src; /* Position courante de curseur*/ GDbMove *move; /* Déplacement à organiser */ GLoadedBinary *binary; /* Binaire en cours d'étude */ - src = gtk_view_panel_get_caret_location(vpanel); + src = gtk_display_panel_get_caret_location(panel); /* S'il n'y a pas de passif, pas besoin d'historique */ if (src == NULL) - gtk_view_panel_scroll_to_address(vpanel, addr, SPT_CENTER); + gtk_display_panel_scroll_to_address(panel, addr, SPT_CENTER); else { move = g_db_move_new(src, addr); - binary = gtk_view_panel_get_binary(vpanel); + binary = gtk_display_panel_get_binary(panel); g_loaded_binary_add_to_collection(binary, G_DB_ITEM(move)); } @@ -337,9 +337,9 @@ static void start_moving_to_address_in_view_panel(GtkViewPanel *vpanel, const vm /****************************************************************************** * * -* Paramètres : vpanel = composant d'affichage parcouru. * -* addr = nouvelle adresse du curseur courant. * -* data = adresse non utilisée ici. * +* Paramètres : panel = composant d'affichage parcouru. * +* addr = nouvelle adresse du curseur courant. * +* data = adresse non utilisée ici. * * * * Description : Suit les changements de position dans du code d'assembleur. * * * @@ -349,7 +349,7 @@ static void start_moving_to_address_in_view_panel(GtkViewPanel *vpanel, const vm * * ******************************************************************************/ -static void track_caret_address_on_view_panel(GtkViewPanel *vpanel, const vmpa2t *addr, void *data) +static void track_caret_address_on_view_panel(GtkDisplayPanel *panel, const vmpa2t *addr, void *data) { GEditorItem *iter; /* Boucle de parcours */ GEditorItemClass *klass; /* Classe correspondante */ @@ -359,7 +359,7 @@ static void track_caret_address_on_view_panel(GtkViewPanel *vpanel, const vmpa2t klass = G_EDITOR_ITEM_GET_CLASS(iter); if (klass->track_caret != NULL) - klass->track_caret(iter, vpanel, addr); + klass->track_caret(iter, panel, addr); } @@ -368,8 +368,8 @@ static void track_caret_address_on_view_panel(GtkViewPanel *vpanel, const vmpa2t /****************************************************************************** * * -* Paramètres : ref = espace de référencement global. * -* vpanel = nouveau panneau d'affichage actif. * +* Paramètres : ref = espace de référencement global. * +* panel = nouveau panneau d'affichage actif. * * * * Description : Lance une actualisation du fait d'un changement de vue. * * * @@ -379,7 +379,7 @@ static void track_caret_address_on_view_panel(GtkViewPanel *vpanel, const vmpa2t * * ******************************************************************************/ -void change_editor_items_current_view(GObject *ref, GtkViewPanel *vpanel) +void change_editor_items_current_view(GObject *ref, GtkDisplayPanel *panel) { GEditorItem *iter; /* Boucle de parcours */ GEditorItemClass *klass; /* Classe correspondante */ @@ -392,21 +392,21 @@ void change_editor_items_current_view(GObject *ref, GtkViewPanel *vpanel) g_signal_handlers_disconnect_by_func(_current_view, G_CALLBACK(notify_view_panel_focus_change), NULL); } - _current_view = vpanel; + _current_view = panel; editem_list_for_each(iter, _editem_list) { klass = G_EDITOR_ITEM_GET_CLASS(iter); if (klass->update_view != NULL) - klass->update_view(iter, vpanel); + klass->update_view(iter, panel); } - if (vpanel != NULL) + if (panel != NULL) { - g_signal_connect(vpanel, "focus-in-event", G_CALLBACK(notify_view_panel_focus_change), NULL); - g_signal_connect(vpanel, "focus-out-event", G_CALLBACK(notify_view_panel_focus_change), NULL); + g_signal_connect(panel, "focus-in-event", G_CALLBACK(notify_view_panel_focus_change), NULL); + g_signal_connect(panel, "focus-out-event", G_CALLBACK(notify_view_panel_focus_change), NULL); } /* Suivi du curseur */ @@ -423,17 +423,17 @@ void change_editor_items_current_view(GObject *ref, GtkViewPanel *vpanel) _caret_instance = NULL; } - if (vpanel != NULL) + if (panel != NULL) { - g_signal_connect(vpanel, "move-request", + g_signal_connect(panel, "move-request", G_CALLBACK(start_moving_to_address_in_view_panel), NULL); - g_signal_connect(vpanel, "caret-moved", + g_signal_connect(panel, "caret-moved", G_CALLBACK(track_caret_address_on_view_panel), NULL); - _caret_instance = G_OBJECT(vpanel); + _caret_instance = G_OBJECT(panel); g_object_ref(_caret_instance); } @@ -443,8 +443,8 @@ void change_editor_items_current_view(GObject *ref, GtkViewPanel *vpanel) /****************************************************************************** * * -* Paramètres : ref = espace de référencement global. * -* vpanel = nouveau panneau d'affichage actif. * +* Paramètres : ref = espace de référencement global. * +* panel = nouveau panneau d'affichage actif. * * * * Description : Lance une actualisation du fait d'un changement de contenu. * * * @@ -454,7 +454,7 @@ void change_editor_items_current_view(GObject *ref, GtkViewPanel *vpanel) * * ******************************************************************************/ -void change_editor_items_current_view_content(GtkViewPanel *vpanel) +void change_editor_items_current_view_content(GtkDisplayPanel *panel) { GEditorItem *iter; /* Boucle de parcours */ GEditorItemClass *klass; /* Classe correspondante */ @@ -464,7 +464,7 @@ void change_editor_items_current_view_content(GtkViewPanel *vpanel) klass = G_EDITOR_ITEM_GET_CLASS(iter); if (klass->update_content != NULL) - klass->update_content(iter, vpanel); + klass->update_content(iter, panel); } diff --git a/src/gui/editem.h b/src/gui/editem.h index 958f361..445403a 100644 --- a/src/gui/editem.h +++ b/src/gui/editem.h @@ -31,7 +31,7 @@ #include "../analysis/binary.h" #include "../analysis/project.h" -#include "../gtkext/gtkviewpanel.h" +#include "../gtkext/gtkdisplaypanel.h" @@ -69,7 +69,7 @@ GtkWidget *g_editor_item_get_widget(const GEditorItem *); GLoadedBinary *g_editor_item_get_current_binary(const GEditorItem *); /* Fournit l'affichage de binaire courant. */ -GtkViewPanel *g_editor_item_get_current_view(const GEditorItem *); +GtkDisplayPanel *g_editor_item_get_current_view(const GEditorItem *); @@ -83,10 +83,10 @@ void register_editor_item(GEditorItem *); void change_editor_items_current_binary(GObject *, GLoadedBinary *); /* Lance une actualisation du fait d'un changement de vue. */ -void change_editor_items_current_view(GObject *, GtkViewPanel *); +void change_editor_items_current_view(GObject *, GtkDisplayPanel *); /* Lance une actualisation du fait d'un changement de contenu. */ -void change_editor_items_current_view_content(GtkViewPanel *); +void change_editor_items_current_view_content(GtkDisplayPanel *); /* Concentre l'attention de l'ensemble sur une adresse donnée. */ void focus_address_in_editor_items(GLoadedBinary *, const vmpa2t *, GEditorItem *); diff --git a/src/gui/editor.c b/src/gui/editor.c index ef57dbc..736c6f6 100644 --- a/src/gui/editor.c +++ b/src/gui/editor.c @@ -1200,12 +1200,12 @@ static void on_dock_item_switch(GtkDockStation *station, GtkWidget *widget, GObj if (GTK_IS_VIEWPORT(widget)) widget = gtk_bin_get_child(GTK_BIN(widget)); - if (GTK_IS_VIEW_PANEL(widget)) + if (GTK_IS_DISPLAY_PANEL(widget)) { /* Changement de binaire ? */ old_binary = G_LOADED_BINARY(g_object_get_data(ref, "current_binary")); - binary = gtk_view_panel_get_binary(GTK_VIEW_PANEL(widget)); + binary = gtk_display_panel_get_binary(GTK_DISPLAY_PANEL(widget)); if (old_binary != binary) { @@ -1213,9 +1213,9 @@ static void on_dock_item_switch(GtkDockStation *station, GtkWidget *widget, GObj change_editor_items_current_binary(ref, binary); } - change_editor_items_current_view(ref, GTK_VIEW_PANEL(widget)); + change_editor_items_current_view(ref, GTK_DISPLAY_PANEL(widget)); - //notify_panels_of_view_change(GTK_VIEW_PANEL(widget), false); + //notify_panels_of_view_change(GTK_DISPLAY_PANEL(widget), false); } diff --git a/src/gui/menus/binary.c b/src/gui/menus/binary.c index 14e840b..dc94e2b 100644 --- a/src/gui/menus/binary.c +++ b/src/gui/menus/binary.c @@ -96,8 +96,8 @@ GtkWidget *build_menu_binary(GObject *ref, GtkAccelGroup *accgroup, GMenuBar *ba /****************************************************************************** * * -* Paramètres : ref = espace de référencements à consulter. * -* vpanel = panneau d'affichage actif ou NULL si aucun. * +* Paramètres : ref = espace de référencements à consulter. * +* panel = panneau d'affichage actif ou NULL si aucun. * * * * Description : Met à jour les accès du menu "Binaire" selon le contenu. * * * @@ -107,14 +107,14 @@ GtkWidget *build_menu_binary(GObject *ref, GtkAccelGroup *accgroup, GMenuBar *ba * * ******************************************************************************/ -void update_access_in_menu_binary(GObject *ref, GtkViewPanel *vpanel) +void update_access_in_menu_binary(GObject *ref, GtkDisplayPanel *panel) { gboolean access; /* Accès à déterminer */ GtkWidget *item; /* Elément de menu à traiter */ /* Préliminaire */ - access = (vpanel != NULL); + access = (panel != NULL); /* Menus */ @@ -150,7 +150,7 @@ static void mcb_binary_entry_points(GtkMenuItem *menuitem, GMenuBar *bar) GLoadedBinary *binary; /* Binaire présenté à l'écran */ GtkWidget *dialog; /* Boîte de dialogue à montrer */ vmpa2t *addr; /* Adresse de destination */ - GtkViewPanel *vpanel; /* Afficheur effectif de code */ + GtkDisplayPanel *panel; /* Afficheur effectif de code */ item = G_EDITOR_ITEM(bar); @@ -163,8 +163,8 @@ static void mcb_binary_entry_points(GtkMenuItem *menuitem, GMenuBar *bar) { addr = get_address_from_gotox_dialog(dialog); - vpanel = g_editor_item_get_current_view(G_EDITOR_ITEM(bar)); - gtk_view_panel_request_move(vpanel, addr); + panel = g_editor_item_get_current_view(G_EDITOR_ITEM(bar)); + gtk_display_panel_request_move(panel, addr); delete_vmpa(addr); diff --git a/src/gui/menus/binary.h b/src/gui/menus/binary.h index 11727d3..943bd82 100644 --- a/src/gui/menus/binary.h +++ b/src/gui/menus/binary.h @@ -37,7 +37,7 @@ GtkWidget *build_menu_binary(GObject *, GtkAccelGroup *, GMenuBar *); /* Met à jour les accès du menu "Binaire" selon le contenu. */ -void update_access_in_menu_binary(GObject *, GtkViewPanel *); +void update_access_in_menu_binary(GObject *, GtkDisplayPanel *); diff --git a/src/gui/menus/edition.c b/src/gui/menus/edition.c index e2d1db8..95b4f50 100644 --- a/src/gui/menus/edition.c +++ b/src/gui/menus/edition.c @@ -229,9 +229,9 @@ GtkWidget *build_menu_edition(GObject *ref, GtkAccelGroup *accgroup, GMenuBar *b /****************************************************************************** * * -* Paramètres : ref = espace de référencements à consulter. * -* vpanel = panneau d'affichage actif ou NULL si aucun. * -* addr = nouvelle adresse du curseur courant. * +* Paramètres : ref = espace de référencements à consulter. * +* panel = panneau d'affichage actif ou NULL si aucun. * +* addr = nouvelle adresse du curseur courant. * * * * Description : Met à jour les accès du menu "Edition" selon une position. * * * @@ -241,7 +241,7 @@ GtkWidget *build_menu_edition(GObject *ref, GtkAccelGroup *accgroup, GMenuBar *b * * ******************************************************************************/ -void update_access_in_menu_edition(GObject *ref, GtkViewPanel *vpanel, const vmpa2t *addr) +void update_access_in_menu_edition(GObject *ref, GtkDisplayPanel *panel, const vmpa2t *addr) { bool state; /* Etat principal à considérer */ gboolean access; /* Accès à déterminer */ @@ -251,14 +251,14 @@ void update_access_in_menu_edition(GObject *ref, GtkViewPanel *vpanel, const vmp /* Préliminaire */ - if (vpanel == NULL || addr == NULL) + if (panel == NULL || addr == NULL) { state = false; line = NULL; creator = NULL; } else - state = gtk_view_panel_get_position(vpanel, &line, &creator); + state = gtk_display_panel_get_position(panel, &line, &creator); /* Bascule des opérandes numériques */ @@ -317,7 +317,7 @@ static void mcb_edition_goto(GtkMenuItem *menuitem, GMenuBar *bar) GObject *ref; /* Espace de référencements */ GtkWidget *dialog; /* Boîte de dialogue à montrer */ vmpa2t *addr; /* Adresse de destination */ - GtkViewPanel *vpanel; /* Afficheur effectif de code */ + GtkDisplayPanel *panel; /* Afficheur effectif de code */ ref = g_editor_item_get_global_ref(G_EDITOR_ITEM(bar)); dialog = create_goto_dialog(GTK_WINDOW(ref)); @@ -326,8 +326,8 @@ static void mcb_edition_goto(GtkMenuItem *menuitem, GMenuBar *bar) { addr = get_address_from_goto_dialog(dialog); - vpanel = g_editor_item_get_current_view(G_EDITOR_ITEM(bar)); - gtk_view_panel_request_move(vpanel, addr); + panel = g_editor_item_get_current_view(G_EDITOR_ITEM(bar)); + gtk_display_panel_request_move(panel, addr); delete_vmpa(addr); @@ -355,7 +355,7 @@ static void mcb_edition_switch_numeric_operand(GtkMenuItem *menuitem, GMenuBar * { ImmOperandDisplay display; /* Type de basculement */ GEditorItem *editem; /* Autre version de la barre */ - GtkViewPanel *vpanel; /* Afficheur effectif de code */ + GtkDisplayPanel *panel; /* Afficheur effectif de code */ GBufferLine *line; /* Ligne de position courante */ GObject *creator; /* Créateur à l'orgine du seg. */ GDbSwitcher *switcher; /* Bascule à mettre en place */ @@ -368,9 +368,9 @@ static void mcb_edition_switch_numeric_operand(GtkMenuItem *menuitem, GMenuBar * editem = G_EDITOR_ITEM(bar); - vpanel = g_editor_item_get_current_view(editem); + panel = g_editor_item_get_current_view(editem); - if (gtk_view_panel_get_position(vpanel, &line, &creator)) + if (gtk_display_panel_get_position(panel, &line, &creator)) { assert(G_IS_IMM_OPERAND(creator)); @@ -430,15 +430,15 @@ static void mcb_edition_go_back(GtkMenuItem *menuitem, GMenuBar *bar) static void mcb_edition_follow_ref(GtkMenuItem *menuitem, GMenuBar *bar) { - GtkViewPanel *vpanel; /* Afficheur effectif de code */ + GtkDisplayPanel *panel; /* Afficheur effectif de code */ GBufferLine *line; /* Ligne de position courante */ GObject *creator; /* Créateur à l'orgine du seg. */ virt_t virt; /* Adresse virtuelle */ vmpa2t addr; /* Adresse de destination */ - vpanel = g_editor_item_get_current_view(G_EDITOR_ITEM(bar)); + panel = g_editor_item_get_current_view(G_EDITOR_ITEM(bar)); - if (gtk_view_panel_get_position(vpanel, &line, &creator)) + if (gtk_display_panel_get_position(panel, &line, &creator)) { assert(creator != NULL); @@ -461,7 +461,7 @@ static void mcb_edition_follow_ref(GtkMenuItem *menuitem, GMenuBar *bar) if (virt != VMPA_NO_VIRTUAL) { init_vmpa(&addr, VMPA_NO_PHYSICAL, virt); - gtk_view_panel_request_move(vpanel, &addr); + gtk_display_panel_request_move(panel, &addr); } g_object_unref(creator); @@ -487,7 +487,7 @@ static void mcb_edition_follow_ref(GtkMenuItem *menuitem, GMenuBar *bar) static void mcb_edition_list_xrefs(GtkMenuItem *menuitem, GMenuBar *bar) { - GtkViewPanel *vpanel; /* Afficheur effectif de code */ + GtkDisplayPanel *panel; /* Afficheur effectif de code */ GBufferLine *line; /* Ligne de position courante */ const mrange_t *range; /* Couverture en mémoire */ GLoadedBinary *binary; /* Représentation binaire */ @@ -498,9 +498,9 @@ static void mcb_edition_list_xrefs(GtkMenuItem *menuitem, GMenuBar *bar) GtkWidget *dialog; /* Boîte de dialogue à montrer */ vmpa2t *addr; /* Adresse de destination */ - vpanel = g_editor_item_get_current_view(G_EDITOR_ITEM(bar)); + panel = g_editor_item_get_current_view(G_EDITOR_ITEM(bar)); - if (gtk_view_panel_get_position(vpanel, &line, NULL)) + if (gtk_display_panel_get_position(panel, &line, NULL)) { range = g_buffer_line_get_range(line); @@ -530,7 +530,7 @@ static void mcb_edition_list_xrefs(GtkMenuItem *menuitem, GMenuBar *bar) { addr = get_address_from_gotox_dialog(dialog); - gtk_view_panel_request_move(vpanel, addr); + gtk_display_panel_request_move(panel, addr); delete_vmpa(addr); @@ -563,7 +563,7 @@ static void mcb_edition_list_xrefs(GtkMenuItem *menuitem, GMenuBar *bar) static void mcb_edition_bookmarks_toggle(GtkMenuItem *menuitem, GMenuBar *bar) { GEditorItem *editem; /* Autre version de la barre */ - GtkViewPanel *panel; /* Vue offrant l'affichage */ + GtkDisplayPanel *panel; /* Vue offrant l'affichage */ const vmpa2t *curloc; /* Localisation d'un curseur */ GLoadedBinary *binary; /* Binaire en cours d'étude */ GDbCollection *collec; /* Collection à manipuler */ @@ -579,7 +579,7 @@ static void mcb_edition_bookmarks_toggle(GtkMenuItem *menuitem, GMenuBar *bar) panel = g_editor_item_get_current_view(editem); - curloc = gtk_view_panel_get_caret_location(panel); + curloc = gtk_display_panel_get_caret_location(panel); /* Accès à la collection */ diff --git a/src/gui/menus/edition.h b/src/gui/menus/edition.h index eda567d..adfee9e 100644 --- a/src/gui/menus/edition.h +++ b/src/gui/menus/edition.h @@ -30,7 +30,7 @@ #include "menubar.h" -#include "../../gtkext/gtkviewpanel.h" +#include "../../gtkext/gtkdisplaypanel.h" @@ -38,7 +38,7 @@ GtkWidget *build_menu_edition(GObject *, GtkAccelGroup *, GMenuBar *); /* Met à jour les accès du menu "Edition" selon une position. */ -void update_access_in_menu_edition(GObject *, GtkViewPanel *, const vmpa2t *); +void update_access_in_menu_edition(GObject *, GtkDisplayPanel *, const vmpa2t *); diff --git a/src/gui/menus/menubar.c b/src/gui/menus/menubar.c index 78cc367..3753d37 100644 --- a/src/gui/menus/menubar.c +++ b/src/gui/menus/menubar.c @@ -75,13 +75,13 @@ static void g_menu_bar_dispose(GMenuBar *); static void g_menu_bar_finalize(GMenuBar *); /* Lance une actualisation du fait d'un changement de vue. */ -static void update_menu_bar_for_view(GMenuBar *, GtkViewPanel *); +static void update_menu_bar_for_view(GMenuBar *, GtkDisplayPanel *); /* Réagit à un changement de focus des panneaux d'affichage. */ -static void notify_focus_change_for_menu_bar(GMenuBar *, GtkViewPanel *); +static void notify_focus_change_for_menu_bar(GMenuBar *, GtkDisplayPanel *); /* Met à jour les accès aux menus en fonction de la position. */ -static void track_caret_address_for_menu_bar(GMenuBar *, GtkViewPanel *, const vmpa2t *); +static void track_caret_address_for_menu_bar(GMenuBar *, GtkDisplayPanel *, const vmpa2t *); /* Lance une actualisation relative à l'étendue du projet. */ static void update_menu_bar_for_project(GMenuBar *, GStudyProject *); @@ -268,8 +268,8 @@ GEditorItem *g_menu_bar_new(GObject *ref, GtkAccelGroup *accgroup) /****************************************************************************** * * -* Paramètres : bar = barre de menus à actualiser. * -* view = nouveau panneau d'affichage actif. * +* Paramètres : bar = barre de menus à actualiser. * +* panel = nouveau panneau d'affichage actif. * * * * Description : Lance une actualisation du fait d'un changement de vue. * * * @@ -279,9 +279,9 @@ GEditorItem *g_menu_bar_new(GObject *ref, GtkAccelGroup *accgroup) * * ******************************************************************************/ -static void update_menu_bar_for_view(GMenuBar *bar, GtkViewPanel *view) +static void update_menu_bar_for_view(GMenuBar *bar, GtkDisplayPanel *panel) { - update_menu_view_for_view(bar->view, view, bar); + update_menu_view_for_view(bar->view, panel, bar); } @@ -299,14 +299,14 @@ static void update_menu_bar_for_view(GMenuBar *bar, GtkViewPanel *view) * * ******************************************************************************/ -static void notify_focus_change_for_menu_bar(GMenuBar *bar, GtkViewPanel *panel) +static void notify_focus_change_for_menu_bar(GMenuBar *bar, GtkDisplayPanel *panel) { GBufferLine *line; /* Ligne de position courante */ const mrange_t *range; /* Couverture en mémoire */ const vmpa2t *addr; /* Position courante */ GEditorItem *item; /* Autre version de l'élément */ - if (panel != NULL && gtk_view_panel_get_position(panel, &line, NULL)) + if (panel != NULL && gtk_display_panel_get_position(panel, &line, NULL)) { range = g_buffer_line_get_range(line); addr = get_mrange_addr(range); @@ -333,9 +333,9 @@ static void notify_focus_change_for_menu_bar(GMenuBar *bar, GtkViewPanel *panel) /****************************************************************************** * * -* Paramètres : bar = barre de menus à actualiser. * -* vpanel = panneau d'affichage actif ou NULL si aucun. * -* addr = nouvelle adresse du curseur courant. * +* Paramètres : bar = barre de menus à actualiser. * +* panel = panneau d'affichage actif ou NULL si aucun. * +* addr = nouvelle adresse du curseur courant. * * * * Description : Met à jour les accès aux menus en fonction de la position. * * * @@ -345,13 +345,13 @@ static void notify_focus_change_for_menu_bar(GMenuBar *bar, GtkViewPanel *panel) * * ******************************************************************************/ -static void track_caret_address_for_menu_bar(GMenuBar *bar, GtkViewPanel *vpanel, const vmpa2t *addr) +static void track_caret_address_for_menu_bar(GMenuBar *bar, GtkDisplayPanel *panel, const vmpa2t *addr) { GEditorItem *item; /* Autre version de l'élément */ item = G_EDITOR_ITEM(bar); - update_access_in_menu_edition(item->ref, vpanel, addr); + update_access_in_menu_edition(item->ref, panel, addr); } diff --git a/src/gui/menus/view.c b/src/gui/menus/view.c index 1f50d80..9447724 100644 --- a/src/gui/menus/view.c +++ b/src/gui/menus/view.c @@ -160,7 +160,7 @@ GtkWidget *build_menu_view(GObject *ref, GtkAccelGroup *accgroup, GMenuBar *bar) /****************************************************************************** * * * Paramètres : widget = menu principal à actualiser. * -* view = nouveau panneau d'affichage actif. * +* panel = nouveau panneau d'affichage actif. * * bar = barre de menu parente. * * * * Description : Lance une actualisation du fait d'un changement de vue. * @@ -171,7 +171,7 @@ GtkWidget *build_menu_view(GObject *ref, GtkAccelGroup *accgroup, GMenuBar *bar) * * ******************************************************************************/ -void update_menu_view_for_view(GtkWidget *widget, GtkViewPanel *view, GMenuBar *bar) +void update_menu_view_for_view(GtkWidget *widget, GtkDisplayPanel *panel, GMenuBar *bar) { GObject *ref; /* Espace de référencements */ GLoadedBinary *binary; /* Binaire courant */ @@ -184,7 +184,7 @@ void update_menu_view_for_view(GtkWidget *widget, GtkViewPanel *view, GMenuBar * binary = g_editor_item_get_current_binary(G_EDITOR_ITEM(bar)); - content = gtk_view_panel_describe_content(view); + content = gtk_display_panel_describe_content(panel); display = g_loaded_binary_get_column_display(binary, content); @@ -226,8 +226,8 @@ void update_menu_view_for_view(GtkWidget *widget, GtkViewPanel *view, GMenuBar * /****************************************************************************** * * -* Paramètres : ref = espace de référencements à consulter. * -* vpanel = panneau d'affichage actif ou NULL si aucun. * +* Paramètres : ref = espace de référencements à consulter. * +* panel = panneau d'affichage actif ou NULL si aucun. * * * * Description : Met à jour les accès du menu "Affichage" selon le contenu. * * * @@ -237,14 +237,14 @@ void update_menu_view_for_view(GtkWidget *widget, GtkViewPanel *view, GMenuBar * * * ******************************************************************************/ -void update_access_in_menu_view(GObject *ref, GtkViewPanel *vpanel) +void update_access_in_menu_view(GObject *ref, GtkDisplayPanel *panel) { gboolean access; /* Accès à déterminer */ GtkWidget *item; /* Elément de menu à traiter */ /* Préliminaire */ - access = (vpanel != NULL); + access = (panel != NULL); /* Types de panneau de code */ @@ -431,7 +431,7 @@ static void mcb_view_change_support(GtkRadioMenuItem *menuitem, GMenuBar *bar) GSList *group; /* Liste de menus radio */ GSList *iter; /* Boucle de parcours */ BinaryView wanted; /* Nouvelle vue à présenter */ - GtkViewPanel *vpanel; /* Afficheur effectif de code */ + GtkDisplayPanel *panel; /* Afficheur effectif de code */ GtkDockStation *station; /* Base du remplacement */ GtkWidget *scroll; /* Nouveau support à utiliser */ @@ -446,18 +446,18 @@ static void mcb_view_change_support(GtkRadioMenuItem *menuitem, GMenuBar *bar) wanted = GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(iter->data), "kind_of_view")); - vpanel = g_editor_item_get_current_view(G_EDITOR_ITEM(bar)); - station = get_dock_station_for_view_panel(vpanel); + panel = g_editor_item_get_current_view(G_EDITOR_ITEM(bar)); + station = get_dock_station_for_view_panel(panel); /* En vue du retrait de la station d'accueil... */ - g_object_ref(G_OBJECT(vpanel)); + g_object_ref(G_OBJECT(panel)); - vpanel = get_alt_view_for_view_panel(vpanel, wanted); - scroll = get_scroll_window_for_view_panel(vpanel); + panel = get_alt_view_for_view_panel(panel, wanted); + scroll = get_scroll_window_for_view_panel(panel); gtk_dock_panel_change_active_widget(station, scroll); - change_editor_items_current_view(G_EDITOR_ITEM(bar)->ref, vpanel); + change_editor_items_current_view(G_EDITOR_ITEM(bar)->ref, panel); } @@ -481,7 +481,7 @@ static void mcb_view_display_column(GtkCheckMenuItem *menuitem, GMenuBar *bar) { BufferLineColumn col; /* Colonne à traiter */ GLoadedBinary *binary; /* Binaire courant */ - GtkViewPanel *panel; /* Affichage courant */ + GtkDisplayPanel *panel; /* Affichage courant */ BinaryView view; /* Type de vue représentée */ gboolean active; /* Etat de sélection du menu */ @@ -490,7 +490,7 @@ static void mcb_view_display_column(GtkCheckMenuItem *menuitem, GMenuBar *bar) binary = g_editor_item_get_current_binary(G_EDITOR_ITEM(bar)); panel = g_editor_item_get_current_view(G_EDITOR_ITEM(bar)); - view = gtk_view_panel_describe_content(panel); + view = gtk_display_panel_describe_content(panel); active = gtk_check_menu_item_get_active(menuitem); diff --git a/src/gui/menus/view.h b/src/gui/menus/view.h index 8c4dc67..ff8e989 100644 --- a/src/gui/menus/view.h +++ b/src/gui/menus/view.h @@ -37,10 +37,10 @@ GtkWidget *build_menu_view(GObject *, GtkAccelGroup *, GMenuBar *); /* Lance une actualisation du fait d'un changement de vue. */ -void update_menu_view_for_view(GtkWidget *, GtkViewPanel *, GMenuBar *); +void update_menu_view_for_view(GtkWidget *, GtkDisplayPanel *, GMenuBar *); /* Met à jour les accès du menu "Affichage" selon le contenu. */ -void update_access_in_menu_view(GObject *, GtkViewPanel *); +void update_access_in_menu_view(GObject *, GtkDisplayPanel *); diff --git a/src/gui/panels/bookmarks.c b/src/gui/panels/bookmarks.c index 893c1bd..13b952e 100644 --- a/src/gui/panels/bookmarks.c +++ b/src/gui/panels/bookmarks.c @@ -662,7 +662,7 @@ static void on_bookmarks_selection_change(GtkTreeSelection *selection, GBookmark GtkTreeModel *model; /* Modèle de gestion */ GDbBookmark *bookmark; /* Signet en cours d'étude */ const vmpa2t *addr; /* Adressse associée au signet */ - GtkViewPanel *vpanel; /* Afficheur effectif de code */ + GtkDisplayPanel *display; /* Afficheur effectif de code */ if (gtk_tree_selection_get_selected(selection, &model, &iter)) { @@ -670,8 +670,8 @@ static void on_bookmarks_selection_change(GtkTreeSelection *selection, GBookmark addr = g_db_bookmark_get_address(bookmark); - vpanel = g_editor_item_get_current_view(G_EDITOR_ITEM(panel)); - gtk_view_panel_request_move(vpanel, addr); + display = g_editor_item_get_current_view(G_EDITOR_ITEM(panel)); + gtk_display_panel_request_move(display, addr); g_object_unref(G_OBJECT(bookmark)); @@ -1047,7 +1047,7 @@ static gboolean on_button_press_over_bookmarks(GtkWidget *widget, GdkEventButton GtkTreeModel *model; /* Modèle de gestion */ GDbBookmark *bookmark; /* Signet en cours d'étude */ const vmpa2t *addr; /* Adressse associée au signet */ - GtkViewPanel *vpanel; /* Afficheur effectif de code */ + GtkDisplayPanel *display; /* Afficheur effectif de code */ switch (event->button) { @@ -1061,8 +1061,8 @@ static gboolean on_button_press_over_bookmarks(GtkWidget *widget, GdkEventButton addr = g_db_bookmark_get_address(bookmark); - vpanel = g_editor_item_get_current_view(G_EDITOR_ITEM(panel)); - gtk_view_panel_request_move(vpanel, addr); + display = g_editor_item_get_current_view(G_EDITOR_ITEM(panel)); + gtk_display_panel_request_move(display, addr); g_object_unref(G_OBJECT(bookmark)); diff --git a/src/gui/panels/glance.c b/src/gui/panels/glance.c index 272cc4f..153d623 100644 --- a/src/gui/panels/glance.c +++ b/src/gui/panels/glance.c @@ -38,7 +38,7 @@ struct _GGlancePanel { GPanelItem parent; /* A laisser en premier */ - GtkViewPanel *view; /* Vue à représenter */ + GtkDisplayPanel *display; /* Vue à représenter */ GtkRequisition req; /* Pleine taille de la source */ GtkScrolledWindow *support; /* Support défilant associé */ @@ -87,7 +87,7 @@ static void g_glance_panel_dispose(GGlancePanel *); static void g_glance_panel_finalize(GGlancePanel *); /* Lance une actualisation du fait d'un changement de support. */ -static void update_glance_panel_for_view(GGlancePanel *, GtkViewPanel *); +static void update_glance_panel_for_view(GGlancePanel *, GtkDisplayPanel *); /* Réagit à la préparation du défilement du support original. */ static void on_view_scroll_setup(GtkAdjustment *, GGlancePanel *); @@ -102,7 +102,7 @@ static void on_glance_resize(GtkWidget *, GdkRectangle *, GGlancePanel *); static void compute_glance_scale(GGlancePanel *); /* Lance une actualisation du fait d'un changement de vue. */ -static void update_glance_panel_for_view_content(GGlancePanel *, GtkViewPanel *); +static void update_glance_panel_for_view_content(GGlancePanel *, GtkDisplayPanel *); /* Met à jour l'affichage de l'aperçu rapide à présenter. */ static gboolean redraw_glance_area(GtkWidget *, cairo_t *, GGlancePanel *); @@ -281,8 +281,8 @@ GPanelItem *g_glance_panel_new(void) /****************************************************************************** * * -* Paramètres : panel = panneau à actualiser. * -* view = nouveau panneau d'affichage actif. * +* Paramètres : panel = panneau à actualiser. * +* display = nouveau panneau d'affichage actif. * * * * Description : Lance une actualisation du fait d'un changement de support. * * * @@ -292,15 +292,15 @@ GPanelItem *g_glance_panel_new(void) * * ******************************************************************************/ -static void update_glance_panel_for_view(GGlancePanel *panel, GtkViewPanel *view) +static void update_glance_panel_for_view(GGlancePanel *panel, GtkDisplayPanel *display) { GtkWidget *parent; /* Support défilant de la vue */ GtkAdjustment *adj; /* Gestionnaire du défilement */ - if (panel->view != NULL) + if (panel->display != NULL) { - g_object_unref(panel->view); - panel->view = NULL; + g_object_unref(panel->display); + panel->display = NULL; g_object_unref(panel->support); panel->support = NULL; @@ -318,11 +318,11 @@ static void update_glance_panel_for_view(GGlancePanel *panel, GtkViewPanel *view * de la fonction mcb_view_change_support(). */ - parent = gtk_widget_get_parent(GTK_WIDGET(view)); + parent = gtk_widget_get_parent(GTK_WIDGET(display)); if (!GTK_IS_SCROLLED_WINDOW(parent)) return; - panel->view = view; - g_object_ref(panel->view); + panel->display = display; + g_object_ref(panel->display); panel->support = GTK_SCROLLED_WINDOW(parent); g_object_ref(panel->support); @@ -362,13 +362,13 @@ static void on_view_scroll_setup(GtkAdjustment *adj, GGlancePanel *panel) if (gtk_adjustment_get_page_size(hadj) == 0 || gtk_adjustment_get_page_size(vadj) == 0) return; - gtk_widget_get_preferred_size(GTK_WIDGET(panel->view), NULL, &panel->req); + gtk_widget_get_preferred_size(GTK_WIDGET(panel->display), NULL, &panel->req); compute_glance_scale(panel); on_view_scrolled(adj, panel); - update_glance_panel_for_view_content(panel, panel->view); + update_glance_panel_for_view_content(panel, panel->display); } @@ -423,10 +423,10 @@ static void on_view_scrolled(GtkAdjustment *adj, GGlancePanel *panel) static void on_glance_resize(GtkWidget *widget, GdkRectangle *allocation, GGlancePanel *panel) { - if (panel->view != NULL) + if (panel->display != NULL) { on_view_scroll_setup(NULL, panel); - update_glance_panel_for_view_content(panel, panel->view); + update_glance_panel_for_view_content(panel, panel->display); } } @@ -508,8 +508,8 @@ static void compute_glance_scale(GGlancePanel *panel) /****************************************************************************** * * -* Paramètres : panel = panneau à actualiser. * -* view = nouveau panneau d'affichage actif. * +* Paramètres : panel = panneau à actualiser. * +* display = nouveau panneau d'affichage actif. * * * * Description : Lance une actualisation du fait d'un changement de vue. * * * @@ -519,7 +519,7 @@ static void compute_glance_scale(GGlancePanel *panel) * * ******************************************************************************/ -static void update_glance_panel_for_view_content(GGlancePanel *panel, GtkViewPanel *view) +static void update_glance_panel_for_view_content(GGlancePanel *panel, GtkDisplayPanel *display) { cairo_t *cairo; /* Assistant pour le dessin */ GtkAllocation area; /* Dimension de la surface */ @@ -542,7 +542,7 @@ static void update_glance_panel_for_view_content(GGlancePanel *panel, GtkViewPan area.width = panel->painting.width; area.height = panel->painting.height; - gtk_view_panel_cache_glance(view, cairo, &area, panel->scale); + gtk_display_panel_cache_glance(display, cairo, &area, panel->scale); cairo_destroy(cairo); @@ -708,7 +708,7 @@ static gboolean on_button_press_over_glance(GtkWidget *widget, GdkEventButton *e GtkAdjustment *vadj; /* Gestionnaire du défilement */ GdkCursor *cursor; /* Pointeur pour la surface */ - if (panel->view != NULL && event->button == 1) + if (panel->display != NULL && event->button == 1) { panel->start_x = event->x; panel->start_y = event->y; @@ -754,7 +754,7 @@ static gboolean on_button_press_over_glance(GtkWidget *widget, GdkEventButton *e static gboolean on_button_release_over_glance(GtkWidget *widget, GdkEventButton *event, GGlancePanel *panel) { - if (panel->view != NULL && event->button == 1) + if (panel->display != NULL && event->button == 1) { if (panel->valid) gdk_window_set_cursor(gtk_widget_get_window(widget), NULL); @@ -788,7 +788,7 @@ static gboolean on_mouse_motion_over_glance(GtkWidget *widget, GdkEventMotion *e GtkAdjustment *vadj; /* Gestionnaire du défilement */ gdouble value; /* Nouvelle valeur bornée */ - if (panel->view != NULL && event->state & GDK_BUTTON1_MASK && panel->valid) + if (panel->display != NULL && event->state & GDK_BUTTON1_MASK && panel->valid) { diff_x = (event->x - panel->start_x) / panel->scale; diff_y = (event->y - panel->start_y) / panel->scale; diff --git a/src/gui/panels/strings.c b/src/gui/panels/strings.c index a651fff..7a927df 100644 --- a/src/gui/panels/strings.c +++ b/src/gui/panels/strings.c @@ -586,7 +586,7 @@ static void on_strings_selection_change(GtkTreeSelection *selection, GStringsPan GtkTreeModel *model; /* Modèle de gestion */ GBinSymbol *symbol; /* Symbole en cours d'étude */ const vmpa2t *addr; /* Adressse associée au signet */ - GtkViewPanel *vpanel; /* Afficheur effectif de code */ + GtkDisplayPanel *display; /* Afficheur effectif de code */ if (gtk_tree_selection_get_selected(selection, &model, &iter)) { @@ -594,8 +594,8 @@ static void on_strings_selection_change(GtkTreeSelection *selection, GStringsPan addr = get_mrange_addr(g_binary_symbol_get_range(symbol)); - vpanel = g_editor_item_get_current_view(G_EDITOR_ITEM(panel)); - gtk_view_panel_request_move(vpanel, addr); + display = g_editor_item_get_current_view(G_EDITOR_ITEM(panel)); + gtk_display_panel_request_move(display, addr); g_object_unref(G_OBJECT(symbol)); @@ -816,7 +816,7 @@ static gboolean on_button_event_over_strings(GtkWidget *widget, GdkEventButton * GtkTreeModel *model; /* Modèle de gestion */ GBinSymbol *symbol; /* Symbole en cours d'étude */ const vmpa2t *addr; /* Adressse associée au signet */ - GtkViewPanel *vpanel; /* Afficheur effectif de code */ + GtkDisplayPanel *display; /* Afficheur effectif de code */ switch (event->button) { @@ -833,8 +833,8 @@ static gboolean on_button_event_over_strings(GtkWidget *widget, GdkEventButton * addr = get_mrange_addr(g_binary_symbol_get_range(symbol)); - vpanel = g_editor_item_get_current_view(G_EDITOR_ITEM(panel)); - gtk_view_panel_request_move(vpanel, addr); + display = g_editor_item_get_current_view(G_EDITOR_ITEM(panel)); + gtk_display_panel_request_move(display, addr); g_object_unref(G_OBJECT(symbol)); @@ -1034,7 +1034,7 @@ static void mcb_strings_panel_find_refs(GtkMenuItem *menuitem, GStringsPanel *pa GObject *ref; /* Espace de référencements */ GtkWidget *dialog; /* Boîte de dialogue à montrer */ vmpa2t *addr; /* Adresse de destination */ - GtkViewPanel *vpanel; /* Afficheur effectif de code */ + GtkDisplayPanel *display; /* Afficheur effectif de code */ symbol = get_selected_panel_symbol(panel->treeview, NULL); if (symbol == NULL) return; @@ -1059,8 +1059,8 @@ static void mcb_strings_panel_find_refs(GtkMenuItem *menuitem, GStringsPanel *pa { addr = get_address_from_gotox_dialog(dialog); - vpanel = g_editor_item_get_current_view(G_EDITOR_ITEM(panel)); - gtk_view_panel_request_move(vpanel, addr); + display = g_editor_item_get_current_view(G_EDITOR_ITEM(panel)); + gtk_display_panel_request_move(display, addr); delete_vmpa(addr); diff --git a/src/gui/panels/symbols.c b/src/gui/panels/symbols.c index 4fffe35..170d19b 100644 --- a/src/gui/panels/symbols.c +++ b/src/gui/panels/symbols.c @@ -550,7 +550,7 @@ static void on_symbols_selection_change(GtkTreeSelection *selection, GSymbolsPan GtkTreeModel *model; /* Modèle de gestion */ GBinSymbol *symbol; /* Symbole à traiter */ const mrange_t *range; /* Couverture dudit symbole */ - GtkViewPanel *vpanel; /* Afficheur effectif de code */ + GtkDisplayPanel *display; /* Afficheur effectif de code */ if (gtk_tree_selection_get_selected(selection, &model, &iter)) { @@ -560,8 +560,8 @@ static void on_symbols_selection_change(GtkTreeSelection *selection, GSymbolsPan { range = g_binary_symbol_get_range(symbol); - vpanel = g_editor_item_get_current_view(G_EDITOR_ITEM(panel)); - gtk_view_panel_request_move(vpanel, get_mrange_addr(range)); + display = g_editor_item_get_current_view(G_EDITOR_ITEM(panel)); + gtk_display_panel_request_move(display, get_mrange_addr(range)); g_object_unref(G_OBJECT(symbol)); diff --git a/src/gui/tb/portions.c b/src/gui/tb/portions.c index afe78b3..3014de8 100644 --- a/src/gui/tb/portions.c +++ b/src/gui/tb/portions.c @@ -241,12 +241,12 @@ static void update_portions_item_binary(GEditorItem *item, GLoadedBinary *binary static void track_address_on_binary_strip(GtkBinaryStrip *strip, GEditorItem *item) { const vmpa2t *addr; /* Nouvelle destination */ - GtkViewPanel *vpanel; /* Afficheur effectif de code */ + GtkDisplayPanel *panel; /* Afficheur effectif de code */ addr = gtk_binary_strip_get_location(strip); - vpanel = g_editor_item_get_current_view(item); - gtk_view_panel_request_move(vpanel, addr); + panel = g_editor_item_get_current_view(item); + gtk_display_panel_request_move(panel, addr); focus_address_in_editor_items(g_editor_item_get_current_binary(item), addr, item); diff --git a/src/gui/tb/source.c b/src/gui/tb/source.c index 02ed643..504c532 100644 --- a/src/gui/tb/source.c +++ b/src/gui/tb/source.c @@ -69,7 +69,7 @@ static void g_source_tbitem_finalize(GSourceTbItem *); static void update_source_item_binary(GEditorItem *, GLoadedBinary *); /* Réagit à un changement de panneau d'affichage courant. */ -static void update_source_item_view(GEditorItem *, GtkViewPanel *); +static void update_source_item_view(GEditorItem *, GtkDisplayPanel *); /* Réagit à un changement de sélection de la source courante. */ static void change_selected_source(GtkComboBox *, GSourceTbItem *); @@ -269,8 +269,8 @@ static void update_source_item_binary(GEditorItem *item, GLoadedBinary *binary) /****************************************************************************** * * -* Paramètres : item = élément réactif sollicité. * -* view = nouveau panneau d'affichage actif. * +* Paramètres : item = élément réactif sollicité. * +* panel = nouveau panneau d'affichage actif. * * * * Description : Réagit à un changement de panneau d'affichage courant. * * * @@ -280,9 +280,9 @@ static void update_source_item_binary(GEditorItem *item, GLoadedBinary *binary) * * ******************************************************************************/ -static void update_source_item_view(GEditorItem *item, GtkViewPanel *view) +static void update_source_item_view(GEditorItem *item, GtkDisplayPanel *panel) { - gtk_widget_set_sensitive(item->widget, GTK_IS_SOURCE_VIEW(view)); + gtk_widget_set_sensitive(item->widget, GTK_IS_SOURCE_VIEW(panel)); } diff --git a/src/panels/panel-int.h b/src/panels/panel-int.h index ce4b727..5265028 100644 --- a/src/panels/panel-int.h +++ b/src/panels/panel-int.h @@ -38,7 +38,7 @@ typedef void (* reload_for_new_binary_fc) (GEditorPanel *, GLoadedBinary *); /* Réagit à un changement d'affichage principal de contenu. */ -typedef void (* reload_for_new_view_fc) (GEditorPanel *, GtkViewPanel *, bool); +typedef void (* reload_for_new_view_fc) (GEditorPanel *, GtkDisplayPanel *, bool); /* Panneaux à présenter dans l'éditeur (instance) */ diff --git a/src/panels/panel.c b/src/panels/panel.c index dbbbae9..e6eca17 100644 --- a/src/panels/panel.c +++ b/src/panels/panel.c @@ -191,7 +191,7 @@ void notify_panels_of_binary_change(GLoadedBinary *binary) * * ******************************************************************************/ -void notify_panels_of_view_change(GtkViewPanel *panel, bool same) +void notify_panels_of_view_change(GtkDisplayPanel *panel, bool same) { GEditorPanel *iter; /* Boucle de parcours */ diff --git a/src/panels/panel.h b/src/panels/panel.h index ce91b8c..c056dac 100644 --- a/src/panels/panel.h +++ b/src/panels/panel.h @@ -31,7 +31,7 @@ #include "../analysis/binary.h" -#include "../gtkext/gtkviewpanel.h" +#include "../gtkext/gtkdisplaypanel.h" @@ -77,7 +77,7 @@ void init_internal_panels(void); void notify_panels_of_binary_change(GLoadedBinary *); /* Lance une actualisation du fait d'un changement de vue. */ -void notify_panels_of_view_change(GtkViewPanel *, bool); +void notify_panels_of_view_change(GtkDisplayPanel *, bool); |