gem-graph-client/include/signal.h

164 lines
8.0 KiB
C
Raw Normal View History

/* * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Gem-graph client *
* *
* Signals header *
* *
* Copyright © 2021 Libre en Communs <contact@a-lec.org> *
* Copyright © 2021 Adrien Bourmault <neox@a-lec.org> *
* Copyright © 2021 Jean Sirmai <jean@a-lec.org> *
* *
* 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 <http://www.gnu.org/licenses/>. *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * */
#pragma once
#include <gtk-4.0/gtk/gtk.h>
2024-07-22 15:42:24 +02:00
// void on_auto_notification (const char *message); (see "signal.c")
2024-07-22 15:42:24 +02:00
/******************************************************************************/
/* W I N D O W S */
/******************************************************************************/
2024-07-22 15:42:24 +02:00
/* "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 [ deprec "init.c" >> now "widget / dispatch.c" ]
* where all the various windows are declared as static :
2024-07-22 15:42:24 +02:00
* (static GtkWindow *main_window, *dialog_window, *text_window;)
* and where are all the functions useful for initiating and designing these windows.
2024-07-22 15:42:24 +02:00
* 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);
2024-07-22 15:42:24 +02:00
/******************************************************************************/
/* W I D G E T S */
/******************************************************************************/
/* All the callbacks except "on_windows_activation (app)" are in "signal.c" */
/* (see details below) */
2024-07-22 15:42:24 +02:00
/******************************************************************************/
/* F I N I T E S T A T E M A C H I N E (fsm) */
/******************************************************************************/
2024-07-22 15:42:24 +02:00
/* { EXEC xor EDIT } and { STATE xor RULES xor DATA } are states of the fsm */
2024-07-22 15:42:24 +02:00
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);
2024-07-24 23:07:14 +02:00
/*************n_objects*****************************************************************/
2024-07-22 15:42:24 +02:00
/* D I A L O G W I N D O W */
/******************************************************************************/
2024-07-22 15:42:24 +02:00
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);
2024-07-22 15:42:24 +02:00
/******************************************************************************/
/* T R E E (in tree.c & rules.c) */
/******************************************************************************/
2024-07-22 15:42:24 +02:00
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);
2024-07-22 15:42:24 +02:00
/******************************************************************************/
/* G L A R E A (see graphics) */
/******************************************************************************/
2024-07-22 15:42:24 +02:00
gboolean on_glarea_render (GtkGLArea *area, GdkGLContext *context);
void on_glarea_realize (GtkWidget *widget);
void on_glarea_unrealize (GtkWidget *widget);
2024-07-22 15:42:24 +02:00
void on_axis_value_change (GtkAdjustment *adjustment, gpointer data);
2024-07-22 15:42:24 +02:00
/******************************************************************************/
/* M A I N W I N D O W S T A T E P A G E (upper part) */
/******************************************************************************/
2024-07-23 19:43:21 +02:00
void on_updating_objects_transparencies (GtkWidget *btt_reset, GtkScrollbar *reset_scrollbar);
2024-07-22 15:42:24 +02:00
void on_situations_box_do_reset (GtkWidget *btt_reset, GtkScrollbar *reset_scrollbar);
2024-08-06 05:25:41 +02:00
void on_resetting_XYZ_in_state_page ();
2024-08-06 23:19:45 +02:00
2024-08-07 10:40:24 +02:00
/******************************************************************************/
/* M A I N W I N D O W T O P B A R */
/******************************************************************************/
void on_clicked_topbar_right_home (GtkWidget *btt_reset, gpointer data);
void on_clicked_topbar_right_search (GtkWidget *btt_menu, gpointer list_box);
void on_clicked_topbar_right_measure (GtkWidget *btt_measure, gpointer data);
/******************************************************************************/
/* M E A S U R E S */
/******************************************************************************/
2024-08-08 13:37:25 +02:00
// access functions
2024-08-07 10:40:24 +02:00
void on_start_new_measure (GtkWidget *btt_new_measure, gpointer data);
2024-08-06 23:19:45 +02:00
void on_select_rules_first (GtkWidget *btt_new_measure, gpointer data);
2024-08-07 13:18:58 +02:00
void on_measure_depends_on_a_single_event (GtkWidget *btt, gpointer data);
void on_measure_depends_on_two_events (GtkWidget *btt, gpointer data);
2024-08-08 13:37:25 +02:00
void on_select_a_second_rules_set (GtkWidget *btt, gpointer data);
// measurement triggers
2024-08-08 00:10:12 +02:00
void on_measure_single_event_occurences_nb (GtkWidget *btt, gpointer data);
void on_measure_single_event_occurences_dates (GtkWidget *btt, gpointer data);
2024-08-08 07:21:34 +02:00
void on_measure_single_event_occurences_situations (GtkWidget *btt, gpointer data);
void on_measure_time_elapsed_between_two_events (GtkWidget *btt, gpointer data);
void on_measure_third_event_occurences_in_between (GtkWidget *btt, gpointer data);
2024-08-08 13:37:25 +02:00
// correlate ?
2024-08-08 20:00:48 +02:00
void on_select_a_second_measurement (GtkWidget *btt, gpointer data);
2024-08-09 09:21:04 +02:00
void on_skip_this_step (GtkWidget *btt, gpointer data);
2024-08-08 20:00:48 +02:00
void on_something_else (GtkWidget *btt, gpointer data);
2024-08-09 09:21:04 +02:00
void on_closing_page (GtkWidget *btt, gpointer data);
2024-08-08 20:00:48 +02:00