/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Gem-graph client * * * * Signals header * * * * Copyright © 2021 Libre en Communs * * Copyright © 2021 Adrien Bourmault * * Copyright © 2021 Jean Sirmai * * * * This file is part of Gem-graph. * * * * This program is free software: you can redistribute it and/or modify it * * under the terms of the GNU Affero General Public License * * as published by the Free Software Foundation, * * either version 3 of the License, * * or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; * * without even the implied warranty of MERCHANTABILITY * * or FITNESS FOR A PARTICULAR PURPOSE. * * See the GNU Affero General Public License for more details. * * * * You should have received a copy of the GNU Affero General Public License * * along with this program. If not, see . * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #pragma once #include // void on_auto_notification (const char *message); (see "signal.c") /******************************************************************************/ /* W I N D O W S */ /******************************************************************************/ /* "on_windows_activation (app)" is the only function called by "main.c" using : * g_signal_connect (app, "activate", G_CALLBACK (on_windows_activation), NULL); * and the only signal function outside "signals.c". * It is found in "init.c", where all the various windows are declared as static : * (static GtkWindow *main_window, *dialog_window, *text_window;) * and where are all the functions useful for initiating and designing these windows. * It is called only once in "main.c" and nowhere else. * * It creates all the windows, using for each of them * 1) the "gtk_application_window_new (app)" and * 2) a specific "widget_design_name_of_the_window() function * which is in "topbar.c" (last one) (see widget.h) */ void on_windows_activation (GtkApplication *app); /******************************************************************************/ /* W I D G E T S */ /******************************************************************************/ /* All the callbacks except "on_windows_activation (app)" are in "signal.c" */ /* (see details below) */ /******************************************************************************/ /* F I N I T E S T A T E M A C H I N E (fsm) */ /******************************************************************************/ /* { EXEC xor EDIT } and { STATE xor RULES xor DATA } are states of the fsm */ void on_toggle_exec_edit (GtkWidget *btt_XOR_EXEC_EDIT, gpointer user_data); void on_toggle_state_rules_data (GtkWidget *btt_STATE_RULES_DATA, gpointer user_data); // void on_toggle_model_run_stop (GtkWidget *btt_MODEL_RUN_STOP, gpointer data); /******************************************************************************/ /* D I A L O G W I N D O W */ /******************************************************************************/ void on_save_current_model_before_editing (GtkWidget *btt_SAVE_CURRENT_MODEL, gpointer data); void on_discard_current_model_before_editing (GtkWidget *btt_SAVE_CURRENT_MODEL, gpointer data); void on_write_current_model (GtkWidget *btt_WRITE_CURRENT_MODEL, gpointer data); /******************************************************************************/ /* T R E E (in tree.c & rules.c) */ /******************************************************************************/ void on_setup_user_tree_factory (GtkSignalListItemFactory *factory, GObject* object, gpointer user_data); void on_bind_user_tree_factory (GtkSignalListItemFactory *factory, GObject* object, gpointer user_data); /******************************************************************************/ /* G L A R E A (see graphics) */ /******************************************************************************/ gboolean on_glarea_render (GtkGLArea *area, GdkGLContext *context); void on_glarea_realize (GtkWidget *widget); void on_glarea_unrealize (GtkWidget *widget); void on_axis_value_change (GtkAdjustment *adjustment, gpointer data); /******************************************************************************/ /* M A I N W I N D O W T O P B A R */ /******************************************************************************/ void on_clicked_home (GtkWidget *btt_reset, gpointer data); void on_clicked_search (GtkWidget *btt_menu, gpointer list_box); /******************************************************************************/ /* M A I N W I N D O W S T A T E P A G E (upper part) */ /******************************************************************************/ void on_objects_box_do_reset (GtkWidget *btt_reset, GtkScrollbar *reset_scrollbar); void on_situations_box_do_reset (GtkWidget *btt_reset, GtkScrollbar *reset_scrollbar);