'==============================================================================
' Copyright 1995 by Potomac Software, Inc. Use of this material is subject to
' the terms and conditions of the software license agreement.
'      
' HTMLPAVB.TXT: Contains Visual Basic declarations for WebLib (TM).
'============================================================================== 

'==============================================================================
' Numeric identifiers for each HTML tag (tool developer note: these must remain
' in sync with internal lists stored in the DLL).
'==============================================================================

Global Const HTML_INVALID = &H0
Global Const HTML_COMMENT = &H1000

'========== Text style bits, returned by GetTextAttr ==========
Global Const HTML_BOLD = &H0000001&				' <B>				(HTML 2.0)
Global Const HTML_ITALIC = &H0000002& 			' <I>
Global Const HTML_UNDERLINE = &H0000004& 		' <U>
Global Const HTML_EMPHASIS = &H0000008& 		' <EM>
Global Const HTML_STRONG = &H0000010& 			' <STRONG>
Global Const HTML_CITE = &H0000020& 			' <CITE>
Global Const HTML_CODE = &H0000040& 			' <CODE>
Global Const HTML_KEYBOARD = &H0000080& 		' <KBD>
Global Const HTML_SAMPLE = &H0000100& 			' <SAMP>
Global Const HTML_STRIKE = &H0000200& 			' <STRIKE>
Global Const HTML_VARIABLE = &H0000400& 		' <VAR>
Global Const HTML_TYPEWRITER = &H0000800& 		' <TT>
Global Const HTML_LISTING = &H0001000&      	' <LISTING>
Global Const HTML_EXAMPLE = &H0002000&     		' <XMP>
Global Const HTML_PLAINTEXT = &H0004000&     	' <PLAINTEXT>
Global Const HTML_ARGUMENT = &H0008000& 		' <ARG>			(HTML+)
Global Const HTML_DEFINE = &H0010000& 			' <DFN>
Global Const HTML_ABBREV = &H0020000& 			' <ABBREV>
Global Const HTML_COMMAND = &H0040000&     		' <CMD>
Global Const HTML_ACRONYM = &H0080000& 			' <ACRONYM>
Global Const HTML_PERSON = &H0100000& 			' <PERSON>
Global Const HTML_QUOTATION = &H0200000& 		' <Q>
Global Const HTML_STRIKETHRU = &H0400000&     	' <S>
Global Const HTML_SUBSCRIPT = &H0800000&     	' <SUB>
Global Const HTML_SUPERSCRIPT = &H1000000&     	' <SUP>
Global Const HTML_BLINK = &H2000000&			' <BLINK>			(Netscape)

'========== Empty tags, returned by GetTagType ==========
Global Const HTML_BASE = 1						' <BASE>			(HTML 2.0)
Global Const HTML_ISINDEX = 2					' <ISINDEX>
Global Const HTML_LINK = 3						' <LINK>
Global Const HTML_NEXTID = 4					' <NEXTID>
Global Const HTML_META = 5						' <META>
Global Const HTML_BR = 6              			' <BR>
Global Const HTML_DD = 7						' <DD>
Global Const HTML_DT = 8						' <DT>
Global Const HTML_HR = 9						' <HR>
Global Const HTML_IMG = 10						' <IMG>
Global Const HTML_LI = 11						' <LI>
Global Const HTML_P = 12						' <P>
Global Const HTML_SELECT = 13					' <SELECT>	
Global Const HTML_INPUT = 14					' <INPUT>
Global Const HTML_TEXTAREA = 15					' <TEXTAREA>
Global Const HTML_OPTION = 16					' <OPTION>
Global Const HTML_TD = 17						' <TD> 				(HTML+)
Global Const HTML_TH = 18						' <TH>
Global Const HTML_TR = 19						' <TR>
Global Const HTML_RENDER = 20             		' <RENDER>
Global Const HTML_NOBR = 21						' <NOBR>			(Netscape)
Global Const HTML_WBR = 22           			' <WBR>
Global Const HTML_BASEFONT = 23          		' <BASEFONT> 

'========== Container Tags, returned by GetTagType (offset by 256) ==========
Global Const HTML_HTML = 257					' <HTML>			(HTML 2.0)
Global Const HTML_HEAD = 258 					' <HEAD>
Global Const HTML_TITLE = 259  					' <TITLE>
Global Const HTML_A = 260						' <A>
Global Const HTML_ADDRESS = 261   				' <ADDRESS>
Global Const HTML_BLOCKQUOTE = 262				' <BLOCKQUOTE>
Global Const HTML_BODY = 263					' <BODY>
Global Const HTML_DIR = 264						' <DIR>
Global Const HTML_DL = 265						' <DL>
Global Const HTML_H1 = 266						' <H1>
Global Const HTML_H2 = 267   					' <H2>
Global Const HTML_H3 = 268   					' <H3>
Global Const HTML_H4 = 269  					' <H4>
Global Const HTML_H5 = 270   					' <H5>
Global Const HTML_H6 = 271   					' <H6>
Global Const HTML_MENU = 272   					' <MENU>
Global Const HTML_OL = 273  					' <OL>
Global Const HTML_PRE = 274   					' <PRE>
Global Const HTML_UL = 275   					' <UL>
Global Const HTML_FORM = 276   					' <FORM>
Global Const HTML_TABLE = 277   				' <TABLE>			(HTML+)
Global Const HTML_CAPTION = 278   				' <CAPTION>
Global Const HTML_ABSTRACT = 279   				' <ABSTRACT>
Global Const HTML_FIG = 280  					' <FIG>
Global Const HTML_FOOTNOTE = 281   				' <FOOTNOTE>
Global Const HTML_LIT = 282  					' <LIT>
Global Const HTML_MARGIN = 283   				' <MARGIN>
Global Const HTML_MATH = 284   					' <MATH>
Global Const HTML_ONLINE = 285   				' <ONLINE>
Global Const HTML_PRINTED = 286   				' <PRINTED>
Global Const HTML_NOTE = 287					' <NOTE>
Global Const HTML_FONT = 288   					' <FONT>			(Netscape)
Global Const HTML_CENTER = 289   				' <CENTER>                

'==============================================================================
' Flags that may be passed to action functions                           
'============================================================================== 

'========== Flags for ParseFile and ParseBuf ==========
Global Const WL_KEEPATTRIBUTETAG = &H1
Global Const WL_KEEPCLOSINGTAG = &H2

'========== Flags for GetSibling ==========
Global Const WL_FIRSTELEM = 1
Global Const WL_NEXTELEM = 2
Global Const WL_PREVELEM = 3
Global Const WL_LASTELEM = 4

'========== Flag for GetChild, Find and FindEnum to obtain root of parse tree ==========
Global Const WL_ROOTELEMENT	= 0&

'========== Flags for GetElementType ==========
Global Const WL_ROOT = 0	
Global Const WL_TAG = 1
Global Const WL_SPECIALCHAR = 2
Global Const WL_COMMENT = 3
Global Const WL_TEXT = 4

'========== Flags for GetTagAttrInfo ==========
Global Const WL_WORD = 1	
Global Const WL_QUOTEDSTRING = 2
Global Const WL_NUMBER = 3
Global Const WL_STANDALONE = 4

'========== Flags for EnumFindText, EnumFindSpecial, EnumFindComment and EnumFindTagName =====
Global Const WL_ENUMERATEALL = 0&

'========== Values returned by getting the Actions property ==========
Global Const ACTION_PARSEFILE = 1& 
Global Const ACTION_PARSEBUF = 2&
Global Const ACTION_ENDPARSE = 3&
Global Const ACTION_ENUMPARSETREE = 4&
Global Const ACTION_GETCHILD = 5&
Global Const ACTION_GETPARENT = 6&
Global Const ACTION_GETSIBLING = 7&
Global Const ACTION_GETELEMENTTYPE = 8&
Global Const ACTION_GETELEMENTTEXT = 9&
Global Const ACTION_GETTEXTATTR = 10&
Global Const ACTION_GETTAGNAME = 11&
Global Const ACTION_GETTAGTYPE = 12&
Global Const ACTION_GETTAGATTR = 13&
Global Const ACTION_EXTRACTTAGATTR = 14&
Global Const ACTION_FINDTEXT = 15&
Global Const ACTION_FINDSPECIAL = 16&
Global Const ACTION_FINDCOMMENT = 17&
Global Const ACTION_FINDTAGTYPE = 18&
Global Const ACTION_FINDTAGNAME = 19&
Global Const ACTION_FINDTAGATTR = 20&
Global Const ACTION_ENUMFINDTEXT = 21&
Global Const ACTION_ENUMFINDSPECIAL = 22&
Global Const ACTION_ENUMFINDCOMMENT = 23&
Global Const ACTION_ENUMFINDTAGTYPE = 24&
Global Const ACTION_ENUMFINDTAGNAME = 25&
Global Const ACTION_ENUMFINDTAGATTR = 26&
Global Const ACTION_CLEANUP = 27&
Global Const ACTION_PARSEABSOLUTEURL = 28&

' ============================================================================
'  Action functions for WLHtmlParser control 
' ============================================================================

Declare Function actionHtmlParseFile Lib "htmlpavb.vbx" (ByVal lpszFile As String,ByVal wOptions As Integer) As Long
Declare Function actionHtmlParseBuf Lib "htmlpavb.vbx" (ByVal lpszBuf As String,ByVal wOptions As Integer) As Long
Declare Function actionHtmlEndParse Lib "htmlpavb.vbx" () As Long
Declare Function actionHtmlEnumParseTree Lib "htmlpavb.vbx" (ByVal nEnumID As Integer) As Long
Declare Function actionHtmlGetChild Lib "htmlpavb.vbx" (ByVal lElement As Long) As Long
Declare Function actionHtmlGetParent Lib "htmlpavb.vbx" (ByVal lElement As Long) As Long
Declare Function actionHtmlGetSibling Lib "htmlpavb.vbx" (ByVal lElement As Long,ByVal wRel As Integer) As Long
Declare Function actionHtmlGetElementType Lib "htmlpavb.vbx" (ByVal lElement As Long) As Long
Declare Function actionHtmlGetElementText Lib "htmlpavb.vbx" (ByVal lElement As Long) As Long
Declare Function actionHtmlGetTextAttr Lib "htmlpavb.vbx" (ByVal lElement As Long) As Long
Declare Function actionHtmlGetTagName Lib "htmlpavb.vbx" (ByVal lElement As Long) As Long
Declare Function actionHtmlGetTagType Lib "htmlpavb.vbx" (ByVal lElement As Long) As Long              
Declare Function actionHtmlGetTagAttr Lib "htmlpavb.vbx" (ByVal lElement As Long,ByVal lTagAttr As Long) As Long
Declare Function actionHtmlExtractTagAttr Lib "htmlpavb.vbx" (ByVal lElement As Long,ByVal lpszAttr As String) As Long
Declare Function actionHtmlFindText Lib "htmlpavb.vbx" (ByVal lElement As Long,ByVal lpszText As String) As Long
Declare Function actionHtmlFindSpecial Lib "htmlpavb.vbx" (ByVal lElement As Long,ByVal lpszSpecial As String) As Long
Declare Function actionHtmlFindComment Lib "htmlpavb.vbx" (ByVal lElement As Long,ByVal lpszComment As String) As Long
Declare Function actionHtmlFindTagType Lib "htmlpavb.vbx" (ByVal lElement As Long,ByVal nType As Integer) As Long
Declare Function actionHtmlFindTagName Lib "htmlpavb.vbx" (ByVal lElement As Long,ByVal lpszTag As String) As Long
Declare Function actionHtmlFindTagAttr Lib "htmlpavb.vbx" (ByVal lElement As Long,ByVal nType As Integer,ByVal lpszAttr As String,ByVal lpszValue As String) As Long
Declare Function actionHtmlEnumFindText Lib "htmlpavb.vbx" (ByVal lElement As Long,ByVal lpszText As String,ByVal nEnumID As Integer) As Long
Declare Function actionHtmlEnumFindSpecial Lib "htmlpavb.vbx" (ByVal lElement As Long,ByVal lpszSpecial As String,ByVal nEnumID As Integer) As Long
Declare Function actionHtmlEnumFindComment Lib "htmlpavb.vbx" (ByVal lElement As Long,ByVal lpszComment As String,ByVal nEnumID As Integer) As Long
Declare Function actionHtmlEnumFindTagType Lib "htmlpavb.vbx" (ByVal lElement As Long,ByVal nType As Integer,ByVal nEnumID As Integer) As Long
Declare Function actionHtmlEnumFindTagName Lib "htmlpavb.vbx" (ByVal lElement As Long,ByVal lpszTag As String,ByVal nEnumID As Integer) As Long
Declare Function actionHtmlEnumFindTagAttr Lib "htmlpavb.vbx" (ByVal lElement As Long,ByVal nType As Integer,ByVal lpszAttr As String,ByVal lpszValue As String,ByVal nEnumID As Integer) As Long
Declare Function actionHtmlCleanup Lib "htmlpavb.vbx" () As Long
Declare Function actionParseAbsoluteURL Lib "htmlpavb.vbx" (ByVal lpszURL As String) As Long
