1 /********************************************************************************************************** 2 Copyright (c) 2002-2013 Abdul-Rahman Allouche. All rights reserved 3 4 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 5 documentation files (the Gabedit), to deal in the Software without restriction, including without limitation 6 the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 7 and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 8 9 The above copyright notice and this permission notice shall be included in all copies or substantial portions 10 of the Software. 11 12 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 13 TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 14 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 15 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 16 DEALINGS IN THE SOFTWARE. 17 ************************************************************************************************************/ 18 19 #ifndef __GABEDIT_GLOBAL_H__ 20 #define __GABEDIT_GLOBAL_H__ 21 22 #include <stdio.h> 23 #include <string.h> 24 #include <gdk/gdkkeysyms.h> 25 #include <gtk/gtk.h> 26 #include <glib.h> 27 #include <glib/gi18n.h> 28 #include "../Files/GabeditFileChooser.h" 29 #include "../Common/GabeditType.h" 30 31 #define NBNOD GABEDIT_TYPENODE_OTHER + 1 32 33 #define PROG_IS_DEMON GABEDIT_TYPENODE_DEMON 34 #define PROG_IS_GAMESS GABEDIT_TYPENODE_GAMESS 35 #define PROG_IS_GAUSS GABEDIT_TYPENODE_GAUSSIAN 36 #define PROG_IS_MOLCAS GABEDIT_TYPENODE_MOLCAS 37 #define PROG_IS_MOLPRO GABEDIT_TYPENODE_MOLPRO 38 #define PROG_IS_MPQC GABEDIT_TYPENODE_MPQC 39 #define PROG_IS_ORCA GABEDIT_TYPENODE_ORCA 40 #define PROG_IS_FIREFLY GABEDIT_TYPENODE_FIREFLY 41 #define PROG_IS_QCHEM GABEDIT_TYPENODE_QCHEM 42 #define PROG_IS_NWCHEM GABEDIT_TYPENODE_NWCHEM 43 #define PROG_IS_PSICODE GABEDIT_TYPENODE_PSICODE 44 #define PROG_IS_MOPAC GABEDIT_TYPENODE_MOPAC 45 #define PROG_IS_OTHER -1 46 47 #define GEOM_IS_XYZ GABEDIT_TYPENODE_XYZ 48 #define GEOM_IS_ZMAT GABEDIT_TYPENODE_GZMAT 49 #define GEOM_IS_OTHER -1 50 51 #define DATA_MOD_YES 1 52 #define DATA_MOD_NO 0 53 54 #define MAJOR_VERSION 2 55 #define MINOR_VERSION 5 56 #define MICRO_VERSION 1 57 58 /**** Structures *********/ 59 typedef struct _FileOpen 60 { 61 gchar *projectname; /* without .com or .log or .molden */ 62 gchar *datafile; 63 gchar *outputfile; 64 gchar *logfile; 65 gchar *moldenfile; 66 67 gchar *localhost; 68 gchar *localdir; 69 70 gchar *remotehost; 71 gchar *remoteuser; 72 gchar *remotepass; 73 gchar *remotedir; 74 gchar *command; 75 GabEditNetWork netWorkProtocol; 76 }FileOpen; 77 78 typedef struct _FontsStyle 79 { 80 gchar *fontname; 81 GdkColor BaseColor; 82 GdkColor TextColor; 83 }FontsStyle; 84 85 typedef struct _WidgetChildren 86 { 87 gint nchildren; 88 GtkWidget **children; 89 GabeditSignalFunc *destroychildren; 90 }WidgetChildren; 91 92 typedef struct _User 93 { 94 gint ndirs; 95 gchar *username; 96 gchar *password; 97 gchar **dirs; 98 }User; 99 100 typedef struct _Host 101 { 102 gint nusers; 103 gchar *hostname; 104 User *users; 105 }Host; 106 typedef struct _RecentHosts 107 { 108 gint nhosts; 109 Host *hosts; 110 }RecentHosts; 111 112 typedef struct _CommandsList 113 { 114 gint numberOfCommands; 115 gint numberOfDefaultCommand; 116 gchar** commands; 117 }CommandsList; 118 119 typedef struct _CommandsBatch 120 { 121 gint numberOfTypes; 122 gchar** types; 123 gchar** commandListAll; 124 gchar** commandListUser; 125 gchar** commandKill; 126 gchar** jobIdTitle; 127 }CommandsBatch; 128 129 /**** Global variables *********/ 130 GtkWidget *Fenetre; 131 GtkWidget *vboxlistfiles; 132 GtkWidget *vboxtexts; 133 GtkWidget *vboxmain; 134 GtkWidget *BarreMenu; 135 GtkWidget *text; 136 GtkWidget *treeViewProjects; 137 GtkTreeIter *noeud[NBNOD]; 138 GtkWidget *NoteBookText; 139 GtkWidget *NoteBookInfo; 140 GtkWidget *TextOutput; 141 GtkWidget *TextError; 142 GtkWidget *textresult; 143 GtkWidget *HboxWins; 144 GtkWidget *FrameWins; 145 GtkWidget *FrameList; 146 GtkWidget *Hpaned; 147 GtkWidget *ResultEntryPass; 148 GtkWidget *ResultLocalFrame; 149 GtkWidget *ResultRemoteFrame; 150 gint iedit; 151 gint imodif; 152 gint iframe; 153 gchar *NameCommandGamess; 154 gchar *NameCommandGaussian; 155 gchar *NameCommandMolcas; 156 gchar *NameCommandMolpro; 157 gchar *NameCommandMPQC; 158 gchar *NameCommandFireFly; 159 gchar *NameCommandQChem; 160 gchar *NameCommandOrca; 161 gchar *NameCommandDeMon; 162 gchar *NameCommandNWChem; 163 gchar *NameCommandPsicode; 164 gchar *NameCommandMopac; 165 gchar *NameCommandPovray; 166 gint ScreenWidth; 167 gint ScreenHeight; 168 FontsStyle FontsStyleData; 169 FontsStyle FontsStyleResult; 170 FontsStyle FontsStyleOther; 171 FontsStyle FontsStyleLabel; 172 173 RecentHosts recenthosts; 174 175 int iprogram; 176 gboolean MeasureIsHide; 177 FileOpen fileopen; 178 gchar* lastdirectory; 179 GabEditNetWork defaultNetWorkProtocol; 180 gchar* pscpCommand; 181 gchar* plinkCommand; 182 gchar* pscpplinkDirectory; 183 gchar* babelCommand; 184 gchar* gamessDirectory; 185 gchar* fireflyDirectory; 186 gchar* orcaDirectory; 187 gchar* demonDirectory; 188 gchar* nwchemDirectory; 189 gchar* psicodeDirectory; 190 gchar* mopacDirectory; 191 gchar* gaussDirectory; 192 gchar* povrayDirectory; 193 gchar* openbabelDirectory; 194 CommandsList demonCommands; 195 CommandsList gamessCommands; 196 CommandsList gaussianCommands; 197 CommandsList molcasCommands; 198 CommandsList molproCommands; 199 CommandsList mpqcCommands; 200 CommandsList orcaCommands; 201 CommandsList nwchemCommands; 202 CommandsList psicodeCommands; 203 CommandsList fireflyCommands; 204 CommandsList qchemCommands; 205 CommandsList mopacCommands; 206 CommandsList povrayCommands; 207 208 gchar *NameTypeBatch; 209 gchar *NameCommandBatchAll; 210 gchar *NameCommandBatchUser; 211 gchar *NameCommandBatchKill; 212 gchar *NamejobIdTitleBatch; 213 CommandsBatch batchCommands; 214 OpenGLOptions openGLOptions; 215 gint colorMapType; 216 gdouble colorMapColors[3][3]; 217 gdouble alpha_opacity; 218 gdouble multipole_rank; 219 220 #endif /* __GABEDIT_GLOBAL_H__ */ 221 222