GTK4_GG_hack/in_depth.c

44 lines
1.3 KiB
C
Raw Normal View History

#include <gtk-4.0/gtk/gtk.h>
#include <assert.h>
#include "callback.h"
2024-06-04 06:25:47 +02:00
/******************************************************************************/
2024-06-09 11:23:42 +02:00
/* S T A T E S */
2024-06-04 06:25:47 +02:00
/******************************************************************************/
2024-06-09 11:23:42 +02:00
/*
(exec / edit) X (state / rules / measure) X (observ / interpret / read / write)
*/
2024-06-09 11:23:42 +02:00
// EXEC, EDIT, RUN, STOP, STATE, RULES, MEASURE, OBSERVE, INTERPRET, HELP, CONFIG
2024-06-09 11:23:42 +02:00
enum {
EXEC_STOP, EXEC_RUN,
EXEC_STOP_EDIT_RULE, EXEC_RUN_EDIT_RULE,
EXEC_STOP_EDIT_MEASURE, EXEC_RUN_EDIT_MEASURE,
EDIT_STATE, EDIT_RULE,
OBSERVE,
INTERPRET,
HELP,
CONFIGURE
};
2024-06-04 06:25:47 +02:00
2024-06-09 11:23:42 +02:00
static int status = EXEC_STOP;
2024-06-04 06:25:47 +02:00
/******************************************************************************/
2024-06-09 11:23:42 +02:00
/* T R A N S I T I O N S */
2024-06-04 06:25:47 +02:00
/******************************************************************************/
2024-06-09 11:23:42 +02:00
int get_exec_edit_mode () {return status;}
void set_exec_edit_mode (int prescribed) {status = prescribed;}
2024-06-04 06:25:47 +02:00
2024-06-09 11:23:42 +02:00
int get_run_xor_stop_exec () {return status;}
void set_run_xor_stop_exec (int prescribed) {status = prescribed;}
2024-06-09 11:23:42 +02:00
int get_observ_interpret () {return status;}
void set_observ_interpret (int prescribed) {status = prescribed;}
2024-06-09 11:23:42 +02:00
// if (0) printf ("status = %d\n", status);