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

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

Webmaster