GTK4_GG_hack/in_depth.c

44 lines
1.3 KiB
C

#include <gtk-4.0/gtk/gtk.h>
#include <assert.h>
#include "callback.h"
/******************************************************************************/
/* S T A T E S */
/******************************************************************************/
/*
(exec / edit) X (state / rules / measure) X (observ / interpret / read / write)
*/
// EXEC, EDIT, RUN, STOP, STATE, RULES, MEASURE, OBSERVE, INTERPRET, HELP, CONFIG
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
};
static int status = EXEC_STOP;
/******************************************************************************/
/* T R A N S I T I O N S */
/******************************************************************************/
int get_exec_edit_mode () {return status;}
void set_exec_edit_mode (int prescribed) {status = prescribed;}
int get_run_xor_stop_exec () {return status;}
void set_run_xor_stop_exec (int prescribed) {status = prescribed;}
int get_observ_interpret () {return status;}
void set_observ_interpret (int prescribed) {status = prescribed;}
// if (0) printf ("status = %d\n", status);