diff options
Diffstat (limited to 'src/gtkext/gtkbufferdisplay.c')
-rw-r--r-- | src/gtkext/gtkbufferdisplay.c | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/gtkext/gtkbufferdisplay.c b/src/gtkext/gtkbufferdisplay.c index 5ad808f..0794dd4 100644 --- a/src/gtkext/gtkbufferdisplay.c +++ b/src/gtkext/gtkbufferdisplay.c @@ -120,6 +120,12 @@ static gboolean on_block_bar_enter_notify(GtkWidget *, GdkEventCrossing *, GtkBu /* Accompagne la fin du survol d'un élément de barre d'outils. */ static gboolean on_block_bar_leave_notify(GtkWidget *, GdkEventCrossing *, GtkBufferDisplay *); +/* Accompagne le début du survol du bouton de compression. */ +static gboolean on_block_bar_collapsing_enter(GtkWidget *, GdkEventCrossing *, GtkBufferDisplay *); + +/* Accompagne la fin du survol du bouton de compression. */ +static gboolean on_block_bar_collapsing_leave(GtkWidget *, GdkEventCrossing *, GtkBufferDisplay *); + /* ---------------------------------------------------------------------------------- */ @@ -184,6 +190,14 @@ static void gtk_buffer_display_class_init(GtkBufferDisplayClass *class) g_cclosure_marshal_VOID__ENUM, G_TYPE_NONE, 1, GTK_TYPE_SCROLL_TYPE); + g_signal_new("prepare-collapsing", + GTK_TYPE_BUFFER_DISPLAY, + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET(GtkBufferDisplayClass, prepare_collapsing), + NULL, NULL, + g_cclosure_marshal_VOID__BOOLEAN, + G_TYPE_NONE, 1, G_TYPE_BOOLEAN); + } @@ -1257,6 +1271,8 @@ void gtk_buffer_display_add_block_bar(GtkBufferDisplay *display) gtk_builder_add_callback_symbols(display->builder, "on_block_bar_enter_notify", G_CALLBACK(on_block_bar_enter_notify), "on_block_bar_leave_notify", G_CALLBACK(on_block_bar_leave_notify), + "on_block_bar_collapsing_enter", G_CALLBACK(on_block_bar_collapsing_enter), + "on_block_bar_collapsing_leave", G_CALLBACK(on_block_bar_collapsing_leave), NULL); gtk_builder_connect_signals(display->builder, display); @@ -1339,3 +1355,49 @@ static gboolean on_block_bar_leave_notify(GtkWidget *widget, GdkEventCrossing *e return FALSE; } + + +/****************************************************************************** +* * +* Paramètres : widget = composant graphique concerné par l'opération. * +* event = informations liées à l'événement. * +* display = panneau d'affichage impliqué par l'action. * +* * +* Description : Accompagne le début du survol du bouton de compression. * +* * +* Retour : FALSE pour poursuivre la propagation de l'événement. * +* * +* Remarques : - * +* * +******************************************************************************/ + +static gboolean on_block_bar_collapsing_enter(GtkWidget *widget, GdkEventCrossing *event, GtkBufferDisplay *display) +{ + g_signal_emit_by_name(display, "prepare-collapsing", FALSE); + + return FALSE; + +} + + +/****************************************************************************** +* * +* Paramètres : widget = composant graphique concerné par l'opération. * +* event = informations liées à l'événement. * +* display = panneau d'affichage impliqué par l'action. * +* * +* Description : Accompagne la fin du survol du bouton de compression. * +* * +* Retour : FALSE pour poursuivre la propagation de l'événement. * +* * +* Remarques : - * +* * +******************************************************************************/ + +static gboolean on_block_bar_collapsing_leave(GtkWidget *widget, GdkEventCrossing *event, GtkBufferDisplay *display) +{ + g_signal_emit_by_name(display, "prepare-collapsing", TRUE); + + return FALSE; + +} |