?? comphtml.h
字號:
/*SCCSID @(#)comphtml.h 1.3 11/26/97 */
/*******************************************************************/
/* comphtml.h -- structure definition of HTML nodes. */
/* structures are supported both here and on Windows.*/
/* */
/* 06/25/97 -- Creation (LING) */
/* Copyright by EnReach Technology, Inc. */
/*******************************************************************/
#ifndef COMPHTML_H
#define COMPHTML_H
#include "graphic.h"
#ifdef VCD30_OLD
#include "chm_old.h"
#else
typedef long Int32;
typedef unsigned long uInt32;
/* HTML font structure */
/* GXU: this structure is obsolete. If we want to save CHM file size, we chould make it a 8 byte structure for future development */
typedef struct HTMLFont
{
char name[64];
Int32 size;
Int32 bold;
Int32 italic;
Int32 underline;
Int32 strikeout;
} HTMLFont;
/* point structure */
typedef struct tagFGPoint
{
Int32 fX;
Int32 fY;
} FGPoint;
/* rectangle structure */
typedef struct tagFGRect
{
Int32 fLeft;
Int32 fTop;
Int32 fRight;
Int32 fBottom;
} FGRect;
/* operations */
#define HTMLOP_PLUS 0
#define HTMLOP_MINUS 1
#define HTMLOP_MUL 2
#define HTMLOP_DIV 3
typedef struct HTMLOperation {
char result_var[8];
char input_var1[8];
Int32 operator_flag; /* GXU: changed */
char input_var2[8];
} HTMLOperation;
/* html node types, used by hType attribute in HTML_InfoHead structure */
#define HTML_TYPE_TITLE 0 /* title of the html page */
#define HTML_TYPE_TEXT 1 /* text node */
#define HTML_TYPE_CHINESE 2 /* chinese text node */
#define HTML_TYPE_IMAGE 3 /* image node */
#define HTML_TYPE_SQUARE 4 /* square frame */
#define HTML_TYPE_FILLEDSQUARE 5 /* filled square */
#define HTML_TYPE_CIRCLE 6 /* circle frame */
#define HTML_TYPE_FILLEDCIRCLE 7 /* filled circle */
#define HTML_TYPE_LINE 8 /* line */
#define HTML_TYPE_ANCHOR 9 /* anchor node */
#define HTML_TYPE_ANIMATION 10 /* animation node */
#define HTML_TYPE_MAPAREA 11 /* client side image map area node */
#define HTML_TYPE_CLOCK 12 /* clock node */
/* GXU: we no longer support CLOCK any more */
#define HTML_TYPE_REFRESH 13 /* refresh node */
#define HTML_TYPE_VARIABLE 14 /* display variable */
#define HTML_TYPE_SOUND 15 /* sound node */
#define HTML_TYPE_SCRIPT 16
#define HTML_TYPE_BGIMAGE 17
/* header info of compiled html file */
typedef struct tagHTML_FileHead
{
/* unsigned long checksum; */ /* GXU new */
char fAuthTool[24]; /* name of authoring tool */
char fVersion[8]; /* version number */
char fTitleName[64]; /* name of the title */
char fUserName[32]; /* user name */
uInt32 fScreenWidth; /* screen width */
uInt32 fScreenHeight; /* screen height */
uInt32 fBgColor; /* background color index */
uInt32 fPaletteSize; /* size of palette */
char fReserved[64]; /* reserved bits */
} HTML_FileHead;
/* header info of each html node */
typedef struct HTML_InfoHead
{
uInt32 hType; /* type of the node */
uInt32 hSize; /* size of htmlInfo */
unsigned long checksum; /* GXU: checksum info */
} HTML_InfoHead;
/* html info structure */
typedef struct HTML_Info
{
HTML_InfoHead htmlHead; /* header info */
unsigned char htmlInfo[1]; /* info of the html node */
} HTML_Info;
/* html title structure */
typedef struct HTML_Title
{
uInt32 len; /* length of text buffer */
char str[1]; /* content of text buffer */
} HTML_Title;
/* html text structure */
typedef struct HTML_Text
{
FGPNT dispPos; /* display coordinates */
Int32 anchorID; /* anchor id if it's inside an anchor, -1 if not */
HTMLFont textFont; /* font of the text */
uInt32 textColor; /* color index of the text */
uInt32 textLen; /* length of text buffer */
char textBuffer[1]; /* content of text buffer */
} HTML_Text;
/* html chinese structure */
typedef struct HTML_Chinese
{
FGPNT dispPos; /* display coordinates */
Int32 anchorID; /* anchor id if it's inside an anchor, -1 if not */
uInt32 textColor; /* color index of the text */
uInt32 bufLen; /* length of the bitmap buffer (16 * 16) */
char textBuffer[1]; /* content of text buffer */
} HTML_Chinese;
/* html image structure */
typedef struct HTML_Image
{
FGRECT dispPos; /* display coordinates */
Int32 anchorID; /* anchor id if it's inside an anchor, -1 if not */
Int32 animationID; /* animation id if it supports animation, -1 if not */
Int32 animationDelay; /* delay time for animation */
char mapName[64]; /* name of client side image map, empty if no image map */
void *data; /* used to store image data */
uInt32 fnameLen; /* length of the image file name */
char fname[1]; /* image filename */
} HTML_Image;
/* square structure */
typedef struct HTML_Square
{
FGRECT dispPos; /* display coordinates */
uInt32 color; /* border color index */
} HTML_Square;
/* filled square structure */
/* GXU: we don't need duplicated structure */
#if 0
typedef struct HTML_FilledSquare
{
FGRECT dispPos; /* display coordinates */
uInt32 brushColor; /* the inside color index */
} HTML_FilledSquare;
#endif
/* circle structure */
/* GXU: should we change this or make it obsolete */
typedef struct HTML_Circle
{
FGPNT center; /* display coordinates */
uInt32 radius; /* radius */
uInt32 color; /* border color index */
} HTML_Circle;
/* circle structure */
/* GXU: we don't need duplicated data structure */
#if 0
typedef struct HTML_FilledCircle
{
FGRECT dispPos; /* display coordinates */
uInt32 brushColor; /* the inside color index */
} HTML_FilledCircle;
#endif
/* line structure */
typedef struct HTML_Line
{
FGPNT startPos; /* line starting position */
FGPNT endPos; /* line end position */
uInt32 style; /* style of the line (solid, dashed, dotted, etc.) */
uInt32 penColor; /* pen color index */
} HTML_Line;
/* anchor structure */
typedef struct tagHTML_Anchor
{
Int32 anchorID; /* id of the anchor */
uInt32 overlay; /* overlayed url or not */
char pOnEnterAction[16]; /* action on mouse enter event */
char pOnLeaveAction[16]; /* action on mouse leave event */
char pOnClickAction[16]; /* action on mouse click event */
uInt32 numOperations; /* number of operations */
HTMLOperation pOperation[6];/* operation array */
uInt32 hrefLen; /* length of href */
char href[1]; /* url of the anchor */
} HTML_Anchor;
/* animation structure */
typedef struct HTML_Animation
{
uInt32 animationID; /* id of the animation */
uInt32 frameTotal; /* total number of animation frames */
uInt32 runtime; /* animation runtime */
} HTML_Animation;
#define SHAPE_RECTANGLE 0
#define SHAPE_CIRCLE 1
#define SHAPE_POLY 2
/* image map area structure */
typedef struct tagHTML_MapArea
{
char mapName[64]; /* name of client side image map */
uInt32 overlay; /* overlayed url or not */
char pOnEnterAction[16]; /* action on mouse enter event */
char pOnLeaveAction[16]; /* action on mouse leave event */
char pOnClickAction[16]; /* action on mouse click event */
uInt32 numOperations; /* number of operations */
HTMLOperation pOperation[6]; /* operation array */
uInt32 shape; /* shape of the area */
uInt32 numVer; /* number of vertix */
uInt32 hrefLen; /* length of href */
uInt32 coords_n_href[1]; /* coordinates array and url the area */
/* pointed to */
} HTML_MapArea;
/* HTML META Refresh */
typedef struct HTML_Refresh {
uInt32 delay;
uInt32 numOperations;
HTMLOperation pOperation[6];
uInt32 urlLen1;
uInt32 urlLen2;
char url[1];
} HTML_Refresh;
/* HTML Extension Sound */
typedef struct HTML_Sound
{
Int32 loop;
uInt32 sndLen;
char snd[1];
} HTML_Sound;
/* HTML Variable */
typedef struct HTML_Variable {
uInt32 fX;
uInt32 fY;
char name[8];
} HTML_Variable;
/* script structure */
typedef struct tagHTML_Script
{
char language[20]; /* language */
unsigned long scriptLen; /* length of the script contents */
char script[1]; /* contents of script */
} HTML_Script;
/* html background image structure */
typedef struct tagHTML_BgImage
{
FGRECT dispPos; /* display coordinates */
uInt32 offset;
uInt32 fnameLen; /* length of the image file name */
char fname[1]; /* image filename */
} HTML_BgImage;
/* bitmap file header structure */
typedef struct BITMAPFILEHEADER
{
unsigned short bfType;
#if 0
unsigned short dummy;
#endif
unsigned long bfSize;
unsigned short bfReserved1;
unsigned short bfReserved2;
unsigned long bfOffBits;
} BITMAPFILEHEADER;
/* bitmap info header structure */
typedef struct BITMAPINFOHEADER
{
unsigned long biSize;
long biWidth;
long biHeight;
unsigned short biPlanes;
unsigned short biBitCount;
unsigned long biCompression;
unsigned long biSizeImage;
long biXPelsPerMeter;
long biYPelsPerMeter;
unsigned long biClrUsed;
unsigned long biClrImportant;
} BITMAPINFOHEADER;
/* bitmap info structure */
typedef struct MAPINFO
{
BITMAPINFOHEADER bmiHeader;
YUVQUAD bmiColors[1];
} BITMAPINFO;
#endif
#endif /* COMPHTML_H */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -