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

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

Webmaster