File: gperiodic.h

package info (click to toggle)
gperiodic 3.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid, trixie
  • size: 1,872 kB
  • sloc: ansic: 693; makefile: 97
file content (108 lines) | stat: -rw-r--r-- 4,415 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/*
                                                                                                                                                             
gperiodic - a program for browsing the periodic table and looking up
            information on elements.

Copyright (C) 1999-2002 Kyle R. Burton, 2003-2007 Jonas Frantz, 2014-2018 Alexey Loginov
                                                                                                                                                             
    This file is part of gperiodic.
                                                                                                                                                             
    gperiodic is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
                                                                                                                                                             
    gperiodic 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 General Public License for more details.
       
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
       
*/

#include <libintl.h>

#define _(String) g_locale_to_utf8(gettext(String), -1, &bytes_read, &bytes_written, NULL)
#define N_(String) (String)

/* structure to hold element data, as initialized from the static
 * table_data.c. */
enum info_types {
  NAME = 0,
  SYMBOL,
  NUMBER,
  WEIGHT,
  DENSITY,
  MELTING,
  BOILING,
  ATOMIC_RADIUS,
  COVALENT_RADIUS,
  IONIC_RADIUS,
  ATOMIC_VOLUME,
  SPECIFIC_HEAT,
  FUSION_HEAT,
  EVAPORATION_HEAT,
  TERMAL_CONDUCTIVITY,
  DEBYE_TEMP,
  PAULING,
  ENERGY,
  OXIDATION,
  CONFIGURATION,
  LATTICE,
  LATTICE_CONSTANT,
  LATTICE_CA_RATIO,
  APPEARANCE,
  DISCOVERY_DATE,
  DISCOVERED_BY,
  NAMED_AFTER,
  MAX_INFO_NR      /* Has to be the last element */
};

struct table_entry {
  char *info[MAX_INFO_NR];
  int   x;      /* x position in the table */
  int   y;      /* y position in the table */
  GdkColor    color;
  GtkStyle    *style;
  GtkWidget   *button;    /* associated gtk button */
#if !GTK_CHECK_VERSION(2,12,0)
  GtkTooltips *tooltip;    /* associated gtk tooltip */
#endif /* GTK_CHECK_VERSION */
};

struct colorscale {       /* table of maxcolor GkdColors */
  int maxcolor;
  GdkColor *scale;
};

typedef double criterion( struct table_entry *entry );

void dump_table(void);

int parse_table(void);

int interactive_shell(void);

/* debugging macro, does nothing unless _DEBUG is defined... */
#if defined(_DEBUG)
#  define _DBG(a) (a)
#else
#  define _DBG(a)
#endif

/************************************************************************************************/
/* 					ABOUT INFO 						*/
/************************************************************************************************/

#define PROGNAME "gperiodic"
#define COPYRIGHT "Copyright (C) 1999-2002 Kyle R. Burton, 2003-2007 Jonas Frantz, 2014-2018 Alexey Loginov"
#define COMMENTS gettext("This program shows the periodic table of elements and information about these elements")
#define LICENSE gettext("gperiodic is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation; either version 2 of the License, or\n(at your option) any later version.\n\ngperiodic is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program; if not, write to the Free Software\nFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA\n")
#define HOMEPAGEURL "https://sourceforge.net/p/gperiodic"
#define HOMEPAGELABEL gettext("gperiodic homepage")
#define AUTHORS {"Kyle R. Burton", "Jonas Frantz", "Alexey Loginov", NULL}