/* This file was automatically generated. Do not edit! */ typedef struct HtmlWidget HtmlWidget; typedef union HtmlElement HtmlElement; int HtmlGetIndex(HtmlWidget *htmlPtr,const char *zIndex,HtmlElement **ppToken,int *pIndex); #define Html_SELECT 116 #define Html_TEXTAREA 133 #define Html_INPUT 77 #define Html_IMG 76 #define Html_LI 81 typedef struct HtmlIndex HtmlIndex; struct HtmlIndex { HtmlElement *p; /* The token containing the character */ int i; /* Index of the character */ }; typedef struct HtmlBlock HtmlBlock; void HtmlIndexToBlockIndex(HtmlWidget *htmlPtr,HtmlIndex sIndex,HtmlBlock **ppBlock,int *piIndex); int HtmlUnlock(HtmlWidget *htmlPtr); Tk_Font HtmlGetFont(HtmlWidget *htmlPtr,int iFont); void HtmlLock(HtmlWidget *htmlPtr); typedef struct HtmlBaseElement HtmlBaseElement; typedef struct HtmlStyle HtmlStyle; struct HtmlStyle { unsigned int font : 6; /* Font to use for display */ unsigned int color : 4; /* Foreground color */ signed int subscript : 4; /* Positive for , negative for */ unsigned int align : 2; /* Horizontal alignment */ unsigned int bgcolor : 4; /* Background color */ unsigned int flags : 12; /* the STY_ flags below */ }; typedef unsigned char Html_u8; typedef short Html_16; struct HtmlBaseElement { HtmlElement *pNext; /* Next input token in a list of them all */ HtmlElement *pPrev; /* Previous token in a list of them all */ HtmlStyle style; /* The rendering style for this token */ Html_u8 type; /* The token type. */ Html_u8 flags; /* The HTML_ flags below */ Html_16 count; /* Various uses, depending on "type" */ }; typedef unsigned short Html_u16; struct HtmlBlock { HtmlBaseElement base; /* Superclass. Must be first */ char *z; /* Space to hold text when n>0 */ int top, bottom; /* Extremes of y coordinates */ Html_u16 left, right; /* Left and right boundry of this object */ Html_u16 n; /* Number of characters in z[] */ HtmlBlock *pPrev, *pNext; /* Linked list of all Blocks */ }; #define STY_Preformatted 0x001 #define Html_Space 2 #define Html_Text 1 int HtmlTokenNumber(HtmlElement *p); #if defined(COVERAGE_TEST) extern int HtmlTPArray[2000]; # define TestPoint(X) {extern int HtmlTPArray[]; HtmlTPArray[X]++;} #endif #if !(defined(COVERAGE_TEST)) # define TestPoint(X) #endif #define Html_Block 4 typedef struct HtmlScript HtmlScript; #define Html_TypeCount 151 typedef struct HtmlStyleStack HtmlStyleStack; typedef struct HtmlLayoutContext HtmlLayoutContext; typedef struct HtmlMargin HtmlMargin; struct HtmlLayoutContext { HtmlWidget *htmlPtr; /* The html widget undergoing layout */ HtmlElement *pStart; /* Start of elements to layout */ HtmlElement *pEnd; /* Stop when reaching this element */ int headRoom; /* Extra space wanted above this line */ int top; /* Absolute top of drawing area */ int bottom; /* Bottom of previous line */ int left, right; /* Left and right extremes of drawing area */ int pageWidth; /* Width of the layout field, including ** the margins */ int maxX, maxY; /* Maximum X and Y values of paint */ HtmlMargin *leftMargin; /* Stack of left margins */ HtmlMargin *rightMargin; /* Stack of right margins */ }; #define N_FONT_FAMILY 8 #define N_FONT_SIZE 7 #define N_FONT (N_FONT_FAMILY*N_FONT_SIZE) #define N_COLOR 16 /* Total number of colors */ typedef struct GcCache GcCache; struct GcCache { GC gc; /* The graphics context */ Html_u8 font; /* Font used for this context */ Html_u8 color; /* Color used for this context */ Html_u8 index; /* Index used for LRU replacement */ }; #define N_CACHE_GC 16 typedef struct HtmlImage HtmlImage; struct HtmlWidget { Tk_Window tkwin; /* The main window for this widget */ Tk_Window clipwin; /* The clipping window in which all text is ** rendered. */ char *zClipwin; /* Name of the clipping window. */ Display *display; /* The X11 Server that contains tkwin */ Tcl_Interp *interp; /* The interpreter in which the widget lives */ char *zCmdName; /* Name of the command */ HtmlElement *pFirst; /* First HTML token on a list of them all */ HtmlElement *pLast; /* Last HTML token on the list */ int nToken; /* Number of HTML tokens on the list. * Html_Block tokens don't count. */ HtmlElement *lastSized; /* Last HTML element that has been sized */ HtmlElement *nextPlaced; /* Next HTML element that needs to be * positioned on canvas. */ HtmlBlock *firstBlock; /* List of all HtmlBlock tokens */ HtmlBlock *lastBlock; /* Last HtmlBlock in the list */ HtmlElement *firstInput; /* First element */ HtmlElement *lastInput; /* Last element */ int nInput; /* The number of elements */ int nForm; /* The number of
elements */ int varId; /* Used to construct a unique name for a ** global array used by elements */ /* * Information about the selected region of text */ HtmlIndex selBegin; /* Start of the selection */ HtmlIndex selEnd; /* End of the selection */ HtmlBlock *pSelStartBlock; /* Block in which selection starts */ Html_16 selStartIndex; /* Index in pSelStartBlock of first selected * character */ Html_16 selEndIndex; /* Index of last selecte char in pSelEndBlock */ HtmlBlock *pSelEndBlock; /* Block in which selection ends */ /* * Information about the insertion cursor */ int insOnTime; /* How long the cursor states one (millisec) */ int insOffTime; /* How long it is off (milliseconds) */ int insStatus; /* Is it visible? */ Tcl_TimerToken insTimer; /* Timer used to flash the insertion cursor */ HtmlIndex ins; /* The insertion cursor position */ HtmlBlock *pInsBlock; /* The HtmlBlock containing the cursor */ int insIndex; /* Index in pInsBlock of the cursor */ /* * The following fields hold state information used by * the tokenizer. */ char *zText; /* Complete text of the unparsed HTML */ int nText; /* Number of characters in zText */ int nAlloc; /* Space allocated for zText */ int nComplete; /* How much of zText has actually been * converted into tokens */ int iCol; /* The column in which zText[nComplete] * occurs. Used to resolve tabs in input */ int iPlaintext; /* If not zero, this is the token type that * caused us to go into plaintext mode. One * of Html_PLAINTEXT, Html_LISTING or * Html_XMP */ HtmlScript *pScript; /*