gem-graph-client/include/signal.h

135 lines
6.8 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 T O P B A R */
/******************************************************************************/
2024-07-22 15:42:24 +02:00
void on_clicked_home (GtkWidget *btt_reset, gpointer data);
void on_clicked_search (GtkWidget *btt_menu, gpointer list_box);
void on_clicked_measure (GtkWidget *btt_measure, gpointer data);
2024-08-06 18:43:15 +02:00
void on_clicked_new_measure (GtkWidget *btt_new_measure, 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 ();