Return to amaya.h CVS log | Up to [Public] / Amaya / amaya |
1.8 cvs 1: /* 2: * 3: * (c) COPYRIGHT MIT and INRIA, 1996. 4: * Please first read the full copyright statement in file COPYRIGHT. 5: * 6: */ 7: 1.1 cvs 8: #ifndef AMAYA_H 9: #define AMAYA_H 10: 1.10 cvs 11: /* Thot interface */ 12: #include "thot_gui.h" 13: #include "thot_sys.h" 14: #include "app.h" 15: #include "application.h" 16: #include "attribute.h" 17: #include "browser.h" 18: #include "content.h" 19: #include "dialog.h" 20: #include "interface.h" 21: #include "libmsg.h" 22: #include "message.h" 23: #include "presentation.h" 24: #include "selection.h" 25: #include "reference.h" 26: #include "tree.h" 27: #include "view.h" 28: 1.1 cvs 29: /* Included headerfiles */ 1.10 cvs 30: #include "EDITOR.h" 1.1 cvs 31: #include "HTML.h" 32: #include "amayamsg.h" 33: 1.25 cvs 34: #define MAX_LENGTH 512 35: #define NAME_LENGTH 32 36: #define HTAppName "amaya" 1.33 ! cvs 37: #define HTAppVersion "V1.0b Beta" 1.25 cvs 38: 39: /* How are Network accesses provided ? */ 40: #ifdef AMAYA_JAVA 41: #include "libjava.h" 42: #else 43: #include "libwww.h" 44: #endif 1.1 cvs 45: 1.20 cvs 46: /* The different events for a DoubleClick */ 47: typedef enum _DoubleClickEvent 48: { 49: DC_FALSE = 0, 50: DC_TRUE = 1, 51: DC_FORM_POST = 2, 52: DC_FORM_GET = 4 53: } 54: DoubleClickEvent; 55: 56: typedef char AmayaReadChar (); 57: 58: /*typedef void *PresentationTarget; */ 59: 60: #define NO 0 61: #define YES 1 62: 63: /* dialogue */ 64: #define URLForm 1 1.29 cvs 65: #define OpenForm 2 66: #define URLName 3 67: #define LocalName 4 68: #define DirSelect 5 69: #define DocSelect 6 1.20 cvs 70: #define StopCommand 7 1.29 cvs 71: #define SaveForm 8 1.20 cvs 72: #define DirSave 9 73: #define DocSave 10 74: #define ToggleSave 11 1.29 cvs 75: #define NameSave 12 1.30 cvs 76: #define ImgDirSave 13 77: #define Label1 14 78: #define Label2 15 79: #define Label3 16 80: #define Label4 17 1.29 cvs 81: #define ConfirmForm 18 82: #define ConfirmText 19 1.20 cvs 83: #define AttrHREFForm 20 84: #define AttrHREFText 21 85: #define FormAnswer 22 86: #define AnswerText 24 87: #define NameText 25 88: #define PasswordText 26 1.30 cvs 89: #define FilterText 27 90: #define ClassForm 28 1.20 cvs 91: #define ClassSelect 29 92: #define AClassForm 30 1.30 cvs 93: #define AClassSelect 31 94: #define ConfirmSave 32 95: #define ConfirmSaveList 33 96: #define OptionMenu 34 1.33 ! cvs 97: #define About1 35 ! 98: #define About2 36 ! 99: #define About3 37 ! 100: #define Version 38 ! 101: #define FormAbout 39 1.20 cvs 102: #define MAX_REF 40 103: 1.11 cvs 104: /* The possible GET/POST/PUT request modes */ 1.1 cvs 105: 1.11 cvs 106: /*synchronous request*/ 107: #define AMAYA_SYNC 1 /*0x000001 */ 108: /*synchronous request with incremental callbacks */ 109: #define AMAYA_ISYNC 2 /*0x000010 */ 110: /*asynchronous request */ 1.5 cvs 111: #define AMAYA_ASYNC 4 /*0x000100 */ 1.11 cvs 112: /*asynchronous request with incremental callbacks */ 1.5 cvs 113: #define AMAYA_IASYNC 8 /*0x001000 */ 1.11 cvs 114: /* send the form using the POST HTTP method */ 1.5 cvs 115: #define AMAYA_FORM_POST 16 /*0x010000 */ 1.11 cvs 116: /* send the form using the GET HTTP method */ 1.5 cvs 117: #define AMAYA_FORM_GET 32 /*0x100000 */ 1.23 cvs 118: /* bypass caching */ 119: #define AMAYA_NOCACHE 64 120: /* don't follow redirections */ 121: #define AMAYA_NOREDIR 128 1.1 cvs 122: 1.26 cvs 123: #ifndef AMAYA_JAVA 124: /* 125: * Flags to indicate the status of the network requests associated 126: * to a document. 127: */ 128: 129: #define AMAYA_NET_INACTIVE 1 130: #define AMAYA_NET_ERROR 2 131: #define AMAYA_NET_ACTIVE 4 132: #endif 133: 1.25 cvs 134: /* 135: * Flags for HTParse, specifying which parts of the URL are needed 136: */ 137: #define AMAYA_PARSE_ACCESS 16 /* Access scheme, e.g. "HTTP" */ 138: #define AMAYA_PARSE_HOST 8 /* Host name, e.g. "www.w3.org" */ 139: #define AMAYA_PARSE_PATH 4 /* URL Path, e.g. "pub/WWW/TheProject.html" */ 140: #define AMAYA_PARSE_ANCHOR 2 /* Fragment identifier, e.g. "news" */ 141: #define AMAYA_PARSE_PUNCTUATION 1 /* Include delimiters, e.g, "/" and ":" */ 142: #define AMAYA_PARSE_ALL 31 /* All the parts */ 1.1 cvs 143: 1.14 cvs 144: THOT_EXPORT int appArgc; 145: THOT_EXPORT char **appArgv; 146: THOT_EXPORT char TempFileDirectory[MAX_LENGTH]; 147: THOT_EXPORT char Answer_text[MAX_LENGTH]; 148: THOT_EXPORT char Answer_name[NAME_LENGTH]; 149: THOT_EXPORT char Answer_password[NAME_LENGTH]; 150: THOT_EXPORT char Display_password[NAME_LENGTH]; 1.30 cvs 151: THOT_EXPORT char ScanFilter[NAME_LENGTH]; /* to scan directories */ 1.14 cvs 152: THOT_EXPORT int Lg_password; 153: THOT_EXPORT int BaseDialog; 154: THOT_EXPORT char *LastURLName; /* last URL requested */ 155: THOT_EXPORT char *DirectoryName; /* local path of the document */ 156: THOT_EXPORT char *DocumentName; /* document name */ 1.30 cvs 157: THOT_EXPORT char *ObjectName; /* document name */ 1.14 cvs 158: THOT_EXPORT char *SaveImgsURL; /* where to save remote Images */ 159: THOT_EXPORT char *TargetName; 1.24 cvs 160: THOT_EXPORT boolean SaveAsHTML; 161: THOT_EXPORT boolean SaveAsText; 1.30 cvs 162: THOT_EXPORT int CopyImages; /* should we copy images in Save As */ 163: THOT_EXPORT int UpdateURLs; /* should we update URLs in Save As */ 1.14 cvs 164: THOT_EXPORT boolean UserAnswer; 165: THOT_EXPORT int ReturnOption; 166: THOT_EXPORT boolean InNewWindow; 167: THOT_EXPORT Document CurrentDocument; 168: THOT_EXPORT Document SavingDocument; 169: THOT_EXPORT Document SavingObject; 1.30 cvs 170: THOT_EXPORT char *SavingFile; /* complete path or URL of the document */ 1.14 cvs 171: THOT_EXPORT Document AttrHREFdocument; 172: THOT_EXPORT Element AttrHREFelement; 173: THOT_EXPORT char *AttrHREFvalue; 174: THOT_EXPORT Document SelectionDoc; 175: THOT_EXPORT boolean SelectionInPRE; 176: THOT_EXPORT boolean SelectionInComment; 177: THOT_EXPORT boolean SelectionInEM; 178: THOT_EXPORT boolean SelectionInSTRONG; 179: THOT_EXPORT boolean SelectionInCITE; 180: THOT_EXPORT boolean SelectionInDFN; 181: THOT_EXPORT boolean SelectionInCODE; 182: THOT_EXPORT boolean SelectionInVAR; 183: THOT_EXPORT boolean SelectionInSAMP; 184: THOT_EXPORT boolean SelectionInKBD; 185: THOT_EXPORT boolean SelectionInI; 186: THOT_EXPORT boolean SelectionInB; 187: THOT_EXPORT boolean SelectionInTT; 1.15 cvs 188: THOT_EXPORT boolean SelectionInU; 1.14 cvs 189: THOT_EXPORT boolean SelectionInSTRIKE; 190: THOT_EXPORT boolean SelectionInBIG; 191: THOT_EXPORT boolean SelectionInSMALL; 1.1 cvs 192: 193: #define DocumentTableLength 10 1.14 cvs 194: THOT_EXPORT char *DocumentURLs[DocumentTableLength]; 1.5 cvs 195: 1.1 cvs 196: /* The whole document is loaded when the corresponding value 197: in FilesLoading is equal to 0 */ 1.14 cvs 198: THOT_EXPORT int FilesLoading[DocumentTableLength]; 1.26 cvs 199: /* Gives the status (error, success) of the download of the objects of 200: a document */ 201: #ifndef AMAYA_JAVA 202: THOT_EXPORT int DocNetworkStatus[DocumentTableLength]; 203: #endif 1.14 cvs 204: THOT_EXPORT Document W3Loading; /* the document being loaded */ 205: THOT_EXPORT int IButton; 206: THOT_EXPORT int BButton; 207: THOT_EXPORT int TTButton; 1.5 cvs 208: 1.18 cvs 209: THOT_EXPORT char AmayaLastHTTPErrorMsg []; 210: 1.1 cvs 211: #define IMAGE_NOT_LOADED 0 212: #define IMAGE_LOCAL 1 213: #define IMAGE_LOADED 2 214: #define IMAGE_MODIFIED 3 215: 1.27 cvs 216: #ifdef __STDC__ 217: typedef void (*LoadedImageCallback)(Document doc, Element el, char *file, 218: void *extra); 219: #else 220: typedef void (*LoadedImageCallback)(); 221: #endif 222: 1.5 cvs 223: typedef struct _ElemImage 224: { 1.27 cvs 225: Element currentElement;/* first element using this image */ 1.5 cvs 226: struct _ElemImage *nextElement; 1.27 cvs 227: LoadedImageCallback callback; /* Callback for non-standard handling */ 228: void *extra; /* any extra info for the CallBack */ 1.5 cvs 229: } 230: ElemImage; 231: 232: typedef struct _LoadedImageDesc 233: { 234: char *originalName; /* complete URL of the image */ 235: char *localName; /* local name (without path) of the image */ 1.27 cvs 236: struct _LoadedImageDesc *prevImage;/* double linked list */ 237: struct _LoadedImageDesc *nextImage;/* easier to unchain */ 1.5 cvs 238: Document document; /* document concerned */ 239: struct _ElemImage *elImage; /* first element using this image */ 1.27 cvs 240: int status; /* the status of the Image loading */ 1.5 cvs 241: } 242: LoadedImageDesc; 243: 1.14 cvs 244: THOT_EXPORT LoadedImageDesc *ImageURLs; 1.31 cvs 245: THOT_EXPORT LoadedImageDesc *ImageLocal; 1.1 cvs 246: 247: #define EOS '\0' 248: #define EOL '\n' 249: #define TAB '\t' 250: #define SPACE ' ' 1.22 cvs 251: 1.25 cvs 252: #endif /* AMAYA_H */ 1.1 cvs 253: