Annotation of Amaya/amaya/amaya.h, revision 1.213

1.8       cvs         1: /*
                      2:  *
1.201     cvs         3:  *  (c) COPYRIGHT MIT and INRIA, 1996-2001.
1.8       cvs         4:  *  Please first read the full copyright statement in file COPYRIGHT.
                      5:  *
                      6:  */
                      7: 
1.59      cvs         8: #ifndef AMAYA_H 
1.1       cvs         9: #define AMAYA_H
                     10: 
1.10      cvs        11: /* Thot interface */
                     12: #include "thot_gui.h"
                     13: #include "thot_sys.h"
1.79      cvs        14: #include "appstruct.h"
1.10      cvs        15: #include "application.h"
                     16: #include "attribute.h"
                     17: #include "browser.h"
                     18: #include "content.h"
                     19: #include "dialog.h"
1.103     cvs        20: #include "fileaccess.h"
1.10      cvs        21: #include "interface.h"
                     22: #include "libmsg.h"
                     23: #include "message.h"
                     24: #include "presentation.h"
                     25: #include "selection.h"
                     26: #include "reference.h"
                     27: #include "tree.h"
                     28: #include "view.h"
1.105     cvs        29: #include "uconvert.h"
1.82      cvs        30: #include "undo.h"
1.1       cvs        31: /* Included headerfiles */
1.10      cvs        32: #include "EDITOR.h"
1.1       cvs        33: #include "HTML.h"
1.197     kahan      34: #include "MathML.h"
                     35: #include "GraphML.h"
1.84      cvs        36: #include "TextFile.h"
1.1       cvs        37: #include "amayamsg.h"
1.156     cvs        38: #include "parser.h"
1.1       cvs        39: 
1.25      cvs        40: #define NAME_LENGTH     32
                     41: 
1.198     cvs        42: #define HTAppName     "amaya"
1.211     vatton     43: #define HTAppVersion  "5.1"
                     44: #define HTAppDate     " 11 July 2001"
1.130     cvs        45: 
                     46: #define URL_STR       "/"
                     47: #define URL_SEP       '/'
1.36      cvs        48: 
1.94      cvs        49: /* Number of views used in Amaya */
                     50: #define AMAYA_MAX_VIEW_DOC  7
                     51: 
1.141     cvs        52: /* the type of character convertion we want to make on local URLs */
                     53: typedef enum _ConvertionType
                     54: {
                     55:   AM_CONV_NONE = 0,
                     56:   AM_CONV_URL_SEP = 0x1, /* converts URL_SEPs into DIR_SEPs */
                     57:   AM_CONV_PERCENT = 0x2, /* converts %xx into the equiv. char */
                     58:   AM_CONV_ALL = 0xFFFF   /* do everything */
                     59: }
                     60: ConvertionType;
                     61: 
1.139     cvs        62: /* the HTTP header name we want to make visible to the application */
                     63: typedef enum _AHTHeaderName
                     64:   {
                     65:     AM_HTTP_CONTENT_TYPE = 0,
1.175     kahan      66:     AM_HTTP_CHARSET = 1,
1.196     kahan      67:     AM_HTTP_CONTENT_LENGTH = 2,
                     68:     AM_HTTP_REASON = 3
1.139     cvs        69:   } 
                     70: AHTHeaderName;
                     71: 
                     72: /* the structure used for exchanging HTTP header info between the net library
                     73:    and amaya */
                     74: typedef struct _AHTHeaders
                     75:   {
1.198     cvs        76:     char *content_type;
                     77:     char *charset;
                     78:     char *content_length;
                     79:     char *reason;
1.139     cvs        80:   }
                     81: AHTHeaders;
                     82: 
1.50      cvs        83: /* The structures used for request callbacks */
                     84: typedef void   TIcbf (Document doc, int status, char *urlName,
1.139     cvs        85:                      char *outputfile, const AHTHeaders *http_headers,
1.50      cvs        86:                      const char *data_block, int data_block_size,
                     87:                      void *context);
                     88: 
1.198     cvs        89: typedef void  TTcbf (Document doc, int status, char *urlName,
                     90:                      char *outputfile, const AHTHeaders *http_headers,
1.50      cvs        91:                      void *context);
                     92: 
1.25      cvs        93: /* How are Network accesses provided ? */
                     94: #include "libwww.h"
1.1       cvs        95: 
1.66      cvs        96: /* The different events to open a new document */
1.41      cvs        97: typedef enum _ClickEvent {
1.73      cvs        98:   CE_ABSOLUTE, CE_RELATIVE, CE_FORM_POST, CE_FORM_GET,
1.153     cvs        99:   CE_HELP, CE_MAKEBOOK, CE_LOG , CE_TEMPLATE, CE_INIT,
1.190     cvs       100:   CE_CSS, CE_ANNOT
1.41      cvs       101: } ClickEvent;
1.20      cvs       102: 
                    103: #define NO               0
                    104: #define YES              1
                    105: 
1.165     cvs       106: /* dialogues */
1.20      cvs       107: #define URLForm          1
1.29      cvs       108: #define OpenForm         2
                    109: #define URLName          3
                    110: #define LocalName        4
                    111: #define DirSelect        5
                    112: #define DocSelect        6
1.20      cvs       113: #define StopCommand      7
1.29      cvs       114: #define SaveForm         8
1.20      cvs       115: #define DirSave          9
                    116: #define DocSave         10
                    117: #define ToggleSave      11
1.29      cvs       118: #define NameSave        12
1.30      cvs       119: #define ImgDirSave      13
1.208     vatton    120: #define ConfirmForm     14
                    121: #define ConfirmText     15
                    122: #define AttrHREFForm    16
                    123: #define AttrHREFText    17
                    124: #define FormAnswer      18
                    125: #define RealmText       19
                    126: #define AnswerText      20
                    127: #define NameText        21
                    128: #define PasswordText    22
                    129: #define FilterText      23
                    130: #define ClassForm       24
                    131: #define ClassSelect     25
                    132: #define AClassForm      26
                    133: #define AClassSelect    27
                    134: #define ConfirmSave     28
                    135: #define ConfirmSaveList 29
                    136: #define BrowserDirSelect   30
                    137: #define BrowserDocSelect   31
                    138: #define BrowserFilterText  32
                    139: #define HREFLocalName   33
                    140: #define MakeIdMenu      34
                    141: #define mElemName       35
                    142: #define mAddId          36
                    143: #define mRemoveId       37
                    144: #define mIdUseSelection 38
                    145: #define mIdStatus       39
                    146: #define FileBrowserForm 40
                    147: #define FileBrowserText 41
                    148: #define FileBrowserFilter 42
                    149: #define FileBrowserLocalName 43
                    150: #define MimeTypeForm    44
                    151: #define MimeTypeSel     45
                    152: #define MimeTypeSave    46
                    153: #define CharsetForm     47
                    154: #define CharsetSave     48
                    155: #define CharsetSel      49
                    156: #define RadioSave       50
                    157: #define MimeFormStatus  51
                    158: #define SaveFormStatus  52
                    159: /* do not add items before this entry */
                    160: #define OptionMenu     53
1.205     kahan     161: 
1.134     cvs       162: /* MAX_SUBMENUS references reserved for submenus of Option menu */
                    163: /* Do not insert new entries here */
1.91      cvs       164: #define MAX_SUBMENUS    400
1.208     vatton    165: #define Label1          54 /* no callback */
                    166: #define Label2          55 /* no callback */
                    167: #define Label3          56 /* no callback */
                    168: #define Label4          57 /* no callback */
                    169: #define About1         58 /* no callback */
                    170: #define About2         59 /* no callback */
                    171: #define About3         60 /* no callback */
                    172: #define Version                61 /* no callback */
                    173: #define CharsetSaveL    62 /* no callback */
                    174: #define MimeTypeSaveL   63 /* no callback */
                    175: /* first callback available: 454 */
1.177     cvs       176: #define AboutForm              454
                    177: #define TableForm       455
                    178: #define TableRows       456
                    179: #define TableCols       457
                    180: #define TableBorder     458
                    181: #define MathEntityForm  459
                    182: #define MathEntityText  460
                    183: #define TitleForm       461
                    184: #define TitleText       462
1.192     cvs       185: #define DocInfoForm           463
                    186: #define DocInfoMimeTypeTitle  464
                    187: #define DocInfoMimeType       465
                    188: #define DocInfoCharsetTitle   466
                    189: #define DocInfoCharset        467
                    190: #define DocInfoContentTitle   468
                    191: #define DocInfoContent        469
                    192: #define DocInfoLocationTitle  470
                    193: #define DocInfoLocation       471
1.194     cvs       194: #define DocInfoTitle1         472
                    195: #define DocInfoTitle2         473
                    196: #define DocInfoContent1       474
                    197: #define DocInfoContent2       475
                    198: #define MAX_REF         476
1.20      cvs       199: 
1.150     cvs       200: #define FormPrint        1
                    201: #define PrintOptions     2
                    202: #define PaperFormat      3
                    203: #define PrintSupport     4
                    204: #define PPrinterName     5
                    205: #define PaperOrientation 6
                    206: #define PPagesPerSheet   7
                    207: #define PRINT_MAX_REF   8
1.147     cvs       208: 
                    209: #define ImageURL       1
                    210: #define ImageLabel     2
                    211: #define ImageLabel2    3
                    212: #define ImageLabel3    4
                    213: #define ImageLabel4    5
                    214: #define ImageDir       6
                    215: #define ImageSel       7
                    216: #define ImageFilter     8
                    217: #define FormImage      9
                    218: #define RepeatImage    10
                    219: #define FormBackground 11
                    220: #define ImageAlt       12
                    221: #define FormAlt        13
                    222: #define IMAGE_MAX_REF  14
                    223: 
                    224: #define CSSForm         0
                    225: #define CSSSelect       1
                    226: #define MAX_CSS_REF     2
                    227: 
                    228: #define FormMaths 0
                    229: #define MenuMaths 1
                    230: #define MAX_MATHS  2
                    231: 
1.165     cvs       232: #ifdef GRAPHML
                    233: #define FormGraph 0
                    234: #define MenuGraph 1
                    235: #define MAX_GRAPH 2
                    236: #endif /* GRAPHML */
                    237: 
1.11      cvs       238: /* The possible GET/POST/PUT request modes */
                    239: /*synchronous request*/
                    240: #define AMAYA_SYNC     1       /*0x000001 */  
                    241: /*synchronous request with incremental callbacks */
                    242: #define AMAYA_ISYNC    2       /*0x000010 */  
                    243: /*asynchronous request */
1.5       cvs       244: #define AMAYA_ASYNC    4       /*0x000100 */
1.11      cvs       245: /*asynchronous request with incremental callbacks */
1.5       cvs       246: #define AMAYA_IASYNC   8       /*0x001000 */
1.11      cvs       247: /* send the form using the POST HTTP method */
1.5       cvs       248: #define AMAYA_FORM_POST 16     /*0x010000 */
1.11      cvs       249: /* send the form using the GET HTTP method */
1.5       cvs       250: #define AMAYA_FORM_GET  32     /*0x100000 */
1.23      cvs       251: /* bypass caching */
                    252: #define AMAYA_NOCACHE  64
                    253: /* don't follow redirections */
                    254: #define AMAYA_NOREDIR  128
1.48      cvs       255: /* Prevents a stop race condition in ASYNC transfers */
                    256: #define AMAYA_ASYNC_SAFE_STOP  256
1.60      cvs       257: #define AMAYA_LOAD_CSS   512
1.67      cvs       258: #define AMAYA_FLUSH_REQUEST 1024
1.80      cvs       259: #define AMAYA_USE_PRECONDITIONS 2048
1.123     cvs       260: #define AMAYA_LOAD_IMAGE 4096
1.167     kahan     261: /* post an annonation */
                    262: #define AMAYA_FILE_POST 8192
                    263: /* delete an annotation */
                    264: #define AMAYA_DELETE    16384
1.180     kahan     265: #define AMAYA_MBOOK_IMAGE 32768
1.87      cvs       266: /*
                    267:  * Flags to indicate the action to take when the network options
                    268:  * are modified
                    269:  */
                    270: #define AMAYA_CACHE_RESTART 1
                    271: #define AMAYA_PROXY_RESTART 2
1.114     cvs       272: #define AMAYA_LANNEG_RESTART 4
                    273: #define AMAYA_SAFEPUT_RESTART 8
1.87      cvs       274: 
1.26      cvs       275: /*
                    276:  * Flags to indicate the status of the network requests associated
                    277:  * to a document.
                    278:  */
                    279: 
                    280: #define AMAYA_NET_INACTIVE 1
                    281: #define AMAYA_NET_ERROR    2
                    282: #define AMAYA_NET_ACTIVE   4
                    283: 
1.25      cvs       284: /*
                    285:  * Flags for HTParse, specifying which parts of the URL are needed
                    286:  */
                    287: #define AMAYA_PARSE_ACCESS      16  /* Access scheme, e.g. "HTTP" */
                    288: #define AMAYA_PARSE_HOST        8   /* Host name, e.g. "www.w3.org" */
                    289: #define AMAYA_PARSE_PATH        4   /* URL Path, e.g. "pub/WWW/TheProject.html" */
                    290: #define AMAYA_PARSE_ANCHOR      2   /* Fragment identifier, e.g. "news" */
                    291: #define AMAYA_PARSE_PUNCTUATION 1   /* Include delimiters, e.g, "/" and ":" */
                    292: #define AMAYA_PARSE_ALL         31  /* All the parts */
1.1       cvs       293: 
1.198     cvs       294: THOT_EXPORT int        AMAYA;     /* Index of amaya message table */
                    295: THOT_EXPORT int        appArgc;
                    296: THOT_EXPORT char     **appArgv;
                    297: THOT_EXPORT char       TempFileDirectory[MAX_LENGTH];
                    298: THOT_EXPORT char       Answer_text[MAX_LENGTH];
                    299: THOT_EXPORT char       Answer_name[NAME_LENGTH];
                    300: THOT_EXPORT char       Answer_password[NAME_LENGTH];
                    301: THOT_EXPORT char       Display_password[NAME_LENGTH];
                    302: THOT_EXPORT char       ScanFilter[NAME_LENGTH]; /* to scan directories    */
                    303: THOT_EXPORT char       MathMLEntityName[MAX_LENGTH]; /* entity name typed by the user for a MathML expression */
                    304: THOT_EXPORT char       IdElemName[MAX_LENGTH]; /* element name typed by the user from the MakeID menu */
                    305: THOT_EXPORT char       IdStatus[50]; /* element name typed by the user from the MakeID menu */
                    306: THOT_EXPORT char       ImgFilter[NAME_LENGTH];
                    307: THOT_EXPORT char      *LastURLName;    /* last URL requested               */
                    308: THOT_EXPORT char      *DirectoryName;  /* local path of the document       */
                    309: THOT_EXPORT char      *DocumentName;   /* document name                    */
                    310: THOT_EXPORT char      *SavePath;       /* saving path                      */
                    311: THOT_EXPORT char      *SaveName;       /* saving name of the document      */
                    312: THOT_EXPORT char      *ObjectName;     /* document name                    */
                    313: THOT_EXPORT char      *SaveImgsURL;    /* where to save remote Images      */
                    314: THOT_EXPORT char      *TargetName;
                    315: THOT_EXPORT char      *SavingFile;     /* complete path or URL of the document */
1.202     cvs       316: THOT_EXPORT char      *SavedDocumentURL;/* URL of the document that contained
                    317:                                           the elements that are now in the
                    318:                                           Cut and Paste buffer */
1.205     kahan     319: THOT_EXPORT char      UserMimeType[MAX_LENGTH];
                    320:                                         /* Used to pass the user's MIME type 
                    321:                                           choice when doing a Save As of a
                    322:                                           local object to a server */
                    323: THOT_EXPORT char      UserCharset[MAX_LENGTH];
                    324:                                         /* Used to pass the user's charset
                    325:                                           choice when doing a Save As of a
                    326:                                           local object to a server */
1.207     kahan     327: THOT_EXPORT char      SaveFormTmp[MAX_LENGTH];
                    328:                                         /* Used for storing the temporary
                    329:                                           changes in the ChangeCharset and
                    330:                                           ChangeMimetype forms */
1.198     cvs       331: THOT_EXPORT int        Lg_password;
                    332: THOT_EXPORT int        BaseDialog;
                    333: THOT_EXPORT int        BasePrint;
                    334: THOT_EXPORT int        BaseImage;
                    335: THOT_EXPORT int               MathsDialogue;
1.165     cvs       336: #ifdef GRAPHML
1.198     cvs       337: THOT_EXPORT int               GraphDialogue;
1.165     cvs       338: #endif /* GRAPHML */
1.198     cvs       339: THOT_EXPORT int               BaseCSS;
                    340: THOT_EXPORT int        ReturnOption;
                    341: THOT_EXPORT int        NumberRows;
                    342: THOT_EXPORT int        NumberCols;
                    343: THOT_EXPORT int        TBorder;
                    344: THOT_EXPORT int        ReturnOptionMenu;
                    345: THOT_EXPORT int        IdDoc;
                    346: THOT_EXPORT Document   CurrentDocument;
                    347: THOT_EXPORT Document   SavingDocument;
                    348: THOT_EXPORT Document   SavingObject;
                    349: THOT_EXPORT Document   AttrHREFdocument;
                    350: THOT_EXPORT Document   DocBook;
                    351: THOT_EXPORT Document   IncludedDocument;
                    352: THOT_EXPORT Element    AttrHREFelement;
                    353: THOT_EXPORT char      *AttrHREFvalue;
                    354: THOT_EXPORT Document   SelectionDoc;
                    355: THOT_EXPORT ThotBool  IsNewAnchor;
                    356: THOT_EXPORT ThotBool  UseLastTarget;
                    357: THOT_EXPORT ThotBool  LinkAsCSS;
                    358: THOT_EXPORT ThotBool   SaveAsHTML;
                    359: THOT_EXPORT ThotBool   SaveAsXML;
                    360: THOT_EXPORT ThotBool   SaveAsText;
                    361: THOT_EXPORT ThotBool   CopyImages;     /* should we copy images in Save As */
                    362: THOT_EXPORT ThotBool   UpdateURLs;     /* should we update URLs in Save As */
                    363: THOT_EXPORT ThotBool   UserAnswer;
                    364: THOT_EXPORT ThotBool   InNewWindow;
                    365: THOT_EXPORT ThotBool   SelectionInPRE;
                    366: THOT_EXPORT ThotBool   SelectionInComment;
                    367: THOT_EXPORT ThotBool   SelectionInEM;
                    368: THOT_EXPORT ThotBool   SelectionInSTRONG;
                    369: THOT_EXPORT ThotBool   SelectionInCITE;
                    370: THOT_EXPORT ThotBool   SelectionInABBR;
                    371: THOT_EXPORT ThotBool   SelectionInACRONYM;
                    372: THOT_EXPORT ThotBool   SelectionInINS;
                    373: THOT_EXPORT ThotBool   SelectionInDEL;
                    374: THOT_EXPORT ThotBool   SelectionInDFN;
                    375: THOT_EXPORT ThotBool   SelectionInCODE;
                    376: THOT_EXPORT ThotBool   SelectionInVAR;
                    377: THOT_EXPORT ThotBool   SelectionInSAMP;
                    378: THOT_EXPORT ThotBool   SelectionInKBD;
                    379: THOT_EXPORT ThotBool   SelectionInI;
                    380: THOT_EXPORT ThotBool   SelectionInB;
                    381: THOT_EXPORT ThotBool   SelectionInTT;
                    382: THOT_EXPORT ThotBool   SelectionInBIG;
                    383: THOT_EXPORT ThotBool   SelectionInSMALL;
                    384: THOT_EXPORT ThotBool   SelectionInSub;
                    385: THOT_EXPORT ThotBool   SelectionInSup;
                    386: THOT_EXPORT ThotBool   SelectionInQuote;
                    387: THOT_EXPORT ThotBool   SelectionInBDO;
                    388: THOT_EXPORT ThotBool   HTMLErrorsFound;
                    389: THOT_EXPORT ThotBool   XMLErrorsFound;
1.203     cvs       390: THOT_EXPORT ThotBool   CSSErrorsFound;
1.198     cvs       391: THOT_EXPORT ThotBool   XMLErrorsFoundInProfile;
                    392: THOT_EXPORT ThotBool   XMLNotWellFormed;
1.204     cvs       393: THOT_EXPORT ThotBool   XMLCharacterNotSupported;
                    394: THOT_EXPORT ThotBool   XMLUnknownEncoding;
                    395: 
1.198     cvs       396: THOT_EXPORT ThotBool   IdApplyToSelection; /* used in the Make ID menu */
                    397: THOT_EXPORT FILE      *ErrFile;
1.53      cvs       398: typedef enum
                    399: {
                    400:   docHTML,
1.74      cvs       401:   docText,
1.75      cvs       402:   docImage,
1.85      cvs       403:   docCSS,
1.110     cvs       404:   docSource,
1.127     cvs       405:   docAnnot,
1.164     cvs       406:   docLog,
                    407:   docSVG,
                    408:   docMath,
1.191     cvs       409:   docXml
1.53      cvs       410: } DocumentType;
1.64      cvs       411: 
                    412: 
                    413: /* a record for data associated with a request */
                    414: typedef struct _DocumentMetaDataElement
                    415: {
1.198     cvs       416:   char    *initial_url;      /* if the server returns a different URL name
                    417:                                after a redirection, we store here the one
                    418:                                that the browser first asked */
                    419:   char    *form_data;        /* form data associated with a URL */
                    420:   char    *content_type;     /* content type returned by the server */
                    421:   char    *charset;          /* charset returned by the server */
                    422:   char    *content_length;   /* content length returned by the server */
1.166     cvs       423:   ClickEvent method;           /* method used to send this data */
                    424:   ThotBool   put_default_name; /* URL name was concatenated with DEFAULT_NAME*/
1.135     cvs       425:   ThotBool   xmlformat;        /* the document should be exported in xml format */
1.166     cvs       426:   
1.144     kahan     427: #ifdef ANNOTATIONS
                    428:   Document   source_doc;       /* if the document is an annotation,
                    429:                                  this variable giveso the annoted document
                    430:                                  docid */
                    431: #endif /* ANNOTATIONS */
1.64      cvs       432: } DocumentMetaDataElement;
1.202     cvs       433: 
1.64      cvs       434: 
1.200     cvs       435: #define DocumentTableLength MAX_DOCUMENTS
1.110     cvs       436: /* URL of each loaded document */
1.198     cvs       437: THOT_EXPORT char                    *DocumentURLs[DocumentTableLength];
1.64      cvs       438: /* Any formdata associated with a URL */
                    439: THOT_EXPORT DocumentMetaDataElement *DocumentMeta[DocumentTableLength];
1.110     cvs       440: /* Type of document */
1.198     cvs       441: THOT_EXPORT DocumentType             DocumentTypes[DocumentTableLength];
1.166     cvs       442: /* Document is in read only mode */
1.198     cvs       443: THOT_EXPORT ThotBool                 ReadOnlyDocument[DocumentTableLength];
1.212     vatton    444: /* Document with section numbering */
                    445: THOT_EXPORT ThotBool                 SNumbering[DocumentTableLength];
1.213   ! vatton    446: /* Document that shows map areas */
        !           447: THOT_EXPORT ThotBool                 MapAreas[DocumentTableLength];
1.110     cvs       448: /* identifier of the document displaying the source code */
1.198     cvs       449: THOT_EXPORT Document                 DocumentSource[DocumentTableLength];
1.110     cvs       450: /* The whole document is loaded when the corresponding entry in FilesLoading is 0 */
1.198     cvs       451: THOT_EXPORT int                      FilesLoading[DocumentTableLength];
1.110     cvs       452: /* Status (error, success) of the download of the objects of a document */
1.198     cvs       453: THOT_EXPORT int                      DocNetworkStatus[DocumentTableLength];
1.156     cvs       454: /* Status of the XHTML document (basic, strict, transitional) */
1.198     cvs       455: THOT_EXPORT int                      ParsingLevel[DocumentTableLength];
1.42      cvs       456: 
1.198     cvs       457: THOT_EXPORT Document                 W3Loading; /* the document being loaded */
                    458: THOT_EXPORT Document                 BackupDocument; /* the current backup */
1.104     cvs       459: 
                    460: /* button indexes */
                    461: THOT_EXPORT int iStop;
                    462: THOT_EXPORT int iBack;
                    463: THOT_EXPORT int iForward;
                    464: THOT_EXPORT int iReload;
                    465: THOT_EXPORT int iHome;
                    466: THOT_EXPORT int iEditor;
                    467: THOT_EXPORT int iSave;
                    468: THOT_EXPORT int iPrint;
                    469: THOT_EXPORT int iFind;
                    470: THOT_EXPORT int iI;
                    471: THOT_EXPORT int iB;
                    472: THOT_EXPORT int iT;
                    473: THOT_EXPORT int iImage;
                    474: THOT_EXPORT int iH1;
                    475: THOT_EXPORT int iH2;
                    476: THOT_EXPORT int iH3;
                    477: THOT_EXPORT int iBullet;
                    478: THOT_EXPORT int iNum;
                    479: THOT_EXPORT int iDL;
                    480: THOT_EXPORT int iLink;
                    481: THOT_EXPORT int iTable;
1.5       cvs       482: 
1.64      cvs       483: #define IMAGE_NOT_LOADED        0
1.1       cvs       484: #define IMAGE_LOCAL            1
                    485: #define IMAGE_LOADED           2
                    486: #define IMAGE_MODIFIED         3
                    487: 
1.109     cvs       488: 
1.198     cvs       489: typedef void (*LoadedImageCallback)(Document doc, Element el, char *file, void *extra);
1.5       cvs       490: typedef struct _ElemImage
                    491:   {
1.27      cvs       492:      Element             currentElement;/* first element using this image */
1.5       cvs       493:      struct _ElemImage  *nextElement;
1.27      cvs       494:      LoadedImageCallback callback;     /* Callback for non-standard handling */
                    495:      void              *extra;         /* any extra info for the CallBack */
1.5       cvs       496:   }
                    497: ElemImage;
                    498: 
                    499: typedef struct _LoadedImageDesc
                    500:   {
1.198     cvs       501:      char               *originalName;  /* complete URL of the image                */
                    502:      char               *localName;     /* local name (without path) of the image   */
1.205     kahan     503:      char               *content_type;  /* the MIME type as sent by the server      */
1.58      cvs       504:      struct _LoadedImageDesc *prevImage;/* double linked list                       */
                    505:      struct _LoadedImageDesc *nextImage;/* easier to unchain                        */
                    506:      Document            document;     /* document concerned                       */
                    507:      struct _ElemImage  *elImage;      /* first element using this image           */
                    508:      int                 imageType;     /* the type of the image                    */
                    509:      int                 status;       /* the status of the image loading          */
1.5       cvs       510:   }
                    511: LoadedImageDesc;
1.109     cvs       512: 
                    513: /* the structure used for storing the context of the 
                    514:    FetchAndDisplayImages_callback function */
                    515: typedef struct _FetchImage_context {
1.198     cvs       516:   char               *base_url;
1.109     cvs       517:   LoadedImageDesc    *desc;
                    518: } FetchImage_context;
                    519: 
1.5       cvs       520: 
1.14      cvs       521: THOT_EXPORT LoadedImageDesc *ImageURLs;
1.31      cvs       522: THOT_EXPORT LoadedImageDesc *ImageLocal;
1.1       cvs       523: 
1.88      cvs       524: /* The default Amaya HOME pages (page shown at boot time */
1.198     cvs       525: #define AMAYA_PAGE  "AmayaPage.html"
                    526: #define AMAYA_PAGE_DOC  "http://www.w3.org/Amaya/User/"
1.137     cvs       527: 
                    528: #ifndef MAX_TXT_LEN
                    529: #define MAX_TXT_LEN 1024       /* Max. length of strings */
                    530: #endif  /* MAX_TXT_LEN */
1.88      cvs       531: 
1.25      cvs       532: #endif /* AMAYA_H */

Webmaster