2024-09-10 12:58:18 +02:00
|
|
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
|
|
* Gem-graph client *
|
|
|
|
* Base header *
|
2024-06-30 11:53:03 +02:00
|
|
|
* *
|
2024-09-10 12:58:18 +02:00
|
|
|
* Copyright © 2021 Libre en Communs <contact@a-lec.org> *
|
|
|
|
* Copyright © 2021-2024 Adrien Bourmault <neox@a-lec.org> *
|
|
|
|
* Copyright © 2021-2024 Jean Sirmai <jean@a-lec.org> *
|
2024-06-30 11:53:03 +02:00
|
|
|
* *
|
2024-09-10 12:58:18 +02:00
|
|
|
* This file is part of Gem-graph. *
|
2024-06-30 11:53:03 +02:00
|
|
|
* *
|
2024-09-10 12:58:18 +02:00
|
|
|
* This program is free software: you can redistribute it and/or modify it *
|
|
|
|
* under the terms of the GNU Affero General Public License *
|
|
|
|
* as publishedby the Free Software Foundation, *
|
|
|
|
* either version 3 of the License, or (at your option) any later version. *
|
2024-06-30 11:53:03 +02:00
|
|
|
* *
|
2024-09-10 12:58:18 +02:00
|
|
|
* 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. *
|
2024-06-30 11:53:03 +02:00
|
|
|
* *
|
2024-09-10 12:58:18 +02:00
|
|
|
* 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/>. *
|
|
|
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
2024-06-30 11:53:03 +02:00
|
|
|
|
2024-04-22 18:40:30 +02:00
|
|
|
|
2024-07-01 00:42:25 +02:00
|
|
|
|
2024-04-22 18:40:30 +02:00
|
|
|
#pragma once
|
|
|
|
#include <assert.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <math.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2024-08-01 15:16:45 +02:00
|
|
|
#include <stddef.h> /* Defines NULL. */
|
2024-04-22 18:40:30 +02:00
|
|
|
#include <stdbool.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <unistd.h>
|
2024-07-31 05:32:25 +02:00
|
|
|
#include <time.h>
|
2024-09-21 08:47:17 +02:00
|
|
|
#include <string.h>
|
2024-07-01 07:26:16 +02:00
|
|
|
|
2024-04-22 18:40:30 +02:00
|
|
|
#include <glib-2.0/glib.h>
|
2024-06-30 11:53:03 +02:00
|
|
|
#include <gtk-4.0/gtk/gtk.h>
|
|
|
|
|
2024-07-18 23:51:04 +02:00
|
|
|
// #define G_APPLICATION_DEFAULT_FLAGS 0 TODO What was this declaration for ?
|
2024-06-30 11:53:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
/* S P A C E S T R U C T U R E S */
|
|
|
|
/******************************************************************************/
|
|
|
|
|
2024-06-30 12:47:34 +02:00
|
|
|
enum { X_AXIS, Y_AXIS, Z_AXIS, N_AXIS }; // < used by graphics.h
|
2024-06-30 11:53:03 +02:00
|
|
|
|
2024-10-14 15:52:00 +02:00
|
|
|
|
|
|
|
/** phantom documentation used to test the functioning of doxygen */
|
|
|
|
|
|
|
|
struct arrow_t {
|
|
|
|
uint load; /**< load phantom documentation */
|
|
|
|
uint site; /**< site phantom documentation */
|
|
|
|
uint x; /**< x phantom documentation */
|
|
|
|
uint y; /**< y phantom documentation */
|
|
|
|
uint z; /**< z phantom documentation */
|
|
|
|
};
|
2024-06-30 11:53:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
2024-07-01 07:26:16 +02:00
|
|
|
If I'm standing on Earth (or any spinning spheroid),
|
|
|
|
looking towards its North pole.
|
2024-06-30 11:53:03 +02:00
|
|
|
|
|
|
|
Then :
|
|
|
|
|
|
|
|
X - X = EAST - WEST = red - cyan
|
|
|
|
Y - Y = ZENITH - NADIR = green - magenta (fuschia)
|
|
|
|
Z - Z = NORTH - SOUTH = blue - yellow
|
|
|
|
*/
|
2024-04-22 18:40:30 +02:00
|
|
|
|
2024-06-30 11:53:03 +02:00
|
|
|
#define EAST 0 // + x red
|
2024-04-22 18:40:30 +02:00
|
|
|
#define WEST 1 // - x cyan
|
2024-06-30 11:53:03 +02:00
|
|
|
#define ZENITH 2 // + y green
|
2024-04-22 18:40:30 +02:00
|
|
|
#define NADIR 3 // - y magenta
|
2024-06-30 11:53:03 +02:00
|
|
|
#define SOUTH 4 // + z blue
|
|
|
|
#define NORTH 5 // - z yellow
|
2024-04-22 18:40:30 +02:00
|
|
|
|