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

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

'========== Flags for ConnectBrowser ==========
Global Const WL_STARTBROWSER = &H1              		' Start browser if not running
Global Const WL_SENDMESSAGE = &H2                		' Notify caller via SendMessage
Global Const WL_POSTMESSAGE = &H4						' Notify caller via PostMessage

'========== Flags for GetWindowInfo, ActivateWindow and OpenURL ==========
Global Const WL_ACTIVEWINDOW = &HFFFFFFFF&				' Operate on active window
Global Const WL_LASTACTIVEWINDOW = &HFFFFFFFF& 			' Activate last active window
Global Const WL_NEWWINDOW = &H0&						' Create new window for URL

'========== Flags for SetWindowPos ==========
Global Const WL_NOCHANGE = &HFFFFFFFF&					' Do not change x, y, width, height

'========== Flags for ShowWindow ==========
Global Const WL_MINIMIZE = &H1							' Minimize window
Global Const WL_MAXIMIZE = &H2                 			' Maximize window
Global Const WL_NORMAL = &H3                 			' Restore window to normal size

'========== Flags for OpenURL, values must conform to DDE API ==========
Global Const WL_NODOCUMENTCACHE = &H1					' Ignore browser's doc cache
Global Const WL_NOIMAGECACHE = &H2						' Ignore browser's image cache
Global Const WL_BACKGROUNDMODE = &H4					' Operate in background mode 

'========== Flags for RegisterViewer, values must conform to DDE API ==========
Global Const WL_SHELLEXECUTE = &H1						' Launch viewer using ShellExecute
Global Const WL_QUERYVIEWER = &H2						' Send event to query filename
Global Const WL_VIEWDOCFILE = &H4						' Send event to view filename

'========== Flags for SetToolbarText ==========
Global Const WL_TOOLBARTEXT	= -1						' Set toolbar text, not button text

'========== Flags for SetToolbarFont ==========
Global Const WL_TOOLBARFONT =  &H1						' Set font for toolbar text
Global Const WL_BUTTONFONT = &H2						' Set font for button text

'========== Flags for SetToolbarTextColor ==========
Global Const WL_TOOLBARTEXTCOLOR = &H1					' Set color for toolbar text
Global Const WL_BUTTONTEXTCOLOR = &H2					' Set color for button text

'========== Flags for WindowChange notification event ==========
Global Const WLF_MOVESIZE = &H00001&
Global Const WLF_MAXIMIZED = &H00002&
Global Const WLF_NORMALIZED	= &H00004&
Global Const WLF_MINIMIZED = &H00008&
Global Const WLF_CLOSED	= &H00010&
Global Const WLF_EXITING = &H10000& 

'========== Values returned by getting the Actions property of WLBrowser ==========

Global Const ACTION_CONNECTBROWSER = 1&
Global Const ACTION_DISCONNECTBROWSER = 2& 
Global Const ACTION_GETWINDOWINFO = 3&
Global Const ACTION_LISTWINDOWS = 4& 
Global Const ACTION_ACTIVATEWINDOW = 5& 
Global Const ACTION_CLOSEWINDOW = 6& 
Global Const ACTION_SETWINDOWPOS = 7& 
Global Const ACTION_SHOWWINDOW = 8& 
Global Const ACTION_SHOWFILE = 9& 
Global Const ACTION_OPENURL = 10& 
Global Const ACTION_SAVEURL = 11& 
Global Const ACTION_POSTFORMDATA = 12& 
Global Const ACTION_SAVEFORMDATA = 13& 
Global Const ACTION_CANCEL = 14& 
Global Const ACTION_REGISTERPROTOCOL = 15& 
Global Const ACTION_REGISTERURLECHO = 16& 
Global Const ACTION_REGISTERVIEWER = 17& 
Global Const ACTION_REGISTERWINDOWCHANGE = 18& 
Global Const ACTION_PARSEANCHOR = 19& 
Global Const ACTION_GETVERSION = 20& 
Global Const ACTION_QUERYURLFILE = 21& 
Global Const ACTION_SETNOTIFYMETHOD = 22& 
Global Const ACTION_GETTRANSACTIONWINDOW = 23& 
Global Const ACTION_APPENDFORMDATA = 24& 
Global Const ACTION_ACCESSFORMDATA = 25&

'========== Values returned by getting the Actions property of WLToolbar ==========

Global Const ACTION_CREATETOOLBAR = 1& 
Global Const ACTION_DELETETOOLBAR = 2& 
Global Const ACTION_ISTOOLBARACTIVE = 3&
Global Const ACTION_SETACTIVETOOLBAR = 4& 
Global Const ACTION_ADDTOOLBARBUTTON = 5& 
Global Const ACTION_REMOVETOOLBARBUTTON = 6& 
Global Const ACTION_ISTOOLBARBUTTONVISIBLE = 7& 
Global Const ACTION_SHOWTOOLBARBUTTON = 8& 
Global Const ACTION_ENABLETOOLBARBUTTON = 9& 
Global Const ACTION_ISTOOLBARBUTTONENABLED = 10& 
Global Const ACTION_GETTOOLBARTEXT = 11& 
Global Const ACTION_SETTOOLBARTEXT = 12& 
Global Const ACTION_GETTOOLBARFONT = 13& 
Global Const ACTION_SETTOOLBARFONT = 14& 
Global Const ACTION_GETTOOLBARBKGND = 15& 
Global Const ACTION_SETTOOLBARBKGND = 16& 
Global Const ACTION_GETTOOLBARTEXTCOLOR = 17& 
Global Const ACTION_SETTOOLBARTEXTCOLOR = 18&

' ============================================================================
'  Housekeeping functions, call from startup form Load/Unload or Sub Main   
' ============================================================================

Declare Function weblibStartup Lib "weblibvb.vbx" () As Integer
Declare Function weblibCleanup Lib "weblibvb.vbx" () As Integer

' ============================================================================
'  Action functions for WLBrowser control 
' ============================================================================

Declare Function actionConnectBrowser Lib "weblibvb.vbx" (ByVal wOptions As Integer) As Long
Declare Function actionDisconnectBrowser Lib "weblibvb.vbx" (ByVal bExit As Integer) As Long
Declare Function actionGetWindowInfo Lib "weblibvb.vbx" (ByVal dwWindow As Long) As Long
Declare Function actionListWindows Lib "weblibvb.vbx" () As Long
Declare Function actionActivateWindow Lib "weblibvb.vbx" (ByVal dwWindow As Long) As Long
Declare Function actionCloseWindow Lib "weblibvb.vbx" (ByVal dwWindow As Long) As Long
Declare Function actionSetWindowPos Lib "weblibvb.vbx" (ByVal dwWindow As Long, ByVal dwX As Long, ByVal dwY As Long, ByVal dwWidth As Long, ByVal dwHeight As Long) As Long
Declare Function actionShowWindow Lib "weblibvb.vbx" (ByVal dwWindow As Long, ByVal nShow As Integer) As Long
Declare Function actionShowFile Lib "weblibvb.vbx" (ByVal lpszFile As String, ByVal lpszMIMEType As String, ByVal dwWindow As Long, ByVal lpszURL As String) As Long
Declare Function actionOpenURL Lib "weblibvb.vbx" (ByVal lpszURL As String, ByVal dwWindow As Long, ByVal wOptions As Integer) As Long
Declare Function actionSaveURL Lib "weblibvb.vbx" (ByVal lpszURL As String, ByVal lpszFile As String, ByVal dwWindow As Long, ByVal wOptions As Integer) As Long
Declare Function actionPostFormData Lib "weblibvb.vbx" (ByVal lpszURL As String, ByVal dwWindow As Long, ByVal lpszFormData As String, ByVal lpszMIMEType As String) As Long
Declare Function actionSaveFormData Lib "weblibvb.vbx" (ByVal lpszURL As String, ByVal lpszFile As String, ByVal dwWindow As Long, ByVal lpszFormData As String, ByVal lpszMIMEType As String) As Long
Declare Function actionCancel Lib "weblibvb.vbx" (ByVal dwTransaction As Long) As Long
Declare Function actionRegisterProtocol Lib "weblibvb.vbx" (ByVal lpszProtocol As String) As Long
Declare Function actionUnregisterProtocol Lib "weblibvb.vbx" (ByVal lpszProtocol As String) As Long
Declare Function actionRegisterURLEcho Lib "weblibvb.vbx" () As Long
Declare Function actionUnregisterURLEcho Lib "weblibvb.vbx" () As Long
Declare Function actionRegisterViewer Lib "weblibvb.vbx" (ByVal lpszMIMEType As String, ByVal wOptions As Integer) As Long
Declare Function actionUnregisterViewer Lib "weblibvb.vbx" (ByVal lpszMIMEType As String) As Long
Declare Function actionRegisterWindowChange Lib "weblibvb.vbx" (ByVal dwWindow As Long) As Long
Declare Function actionUnregisterWindowChange Lib "weblibvb.vbx" (ByVal dwWindow As Long) As Long
Declare Function actionParseAnchor Lib "weblibvb.vbx" (ByVal lpszAbsoluteURL As String, ByVal lpszRelativeURL As String) As Long
Declare Function actionGetVersion Lib "weblibvb.vbx" (ByVal wMajor As Integer, ByVal wMinor As Integer) As Long
Declare Function actionQueryURLFile Lib "weblibvb.vbx" (ByVal lpszFile As String) As Long
Declare Function actionSetNotifyMethod Lib "weblibvb.vbx" (ByVal wMethod As Integer) As Long
Declare Function actionGetTransactionWindow Lib "weblibvb.vbx" (ByVal dwTransaction As Long) As Long

Declare Function actionAppendFormData Lib "weblibvb.vbx" (ByVal lpszName As String,ByVal lpszData As String,ByVal cbData As Integer) As Long
Declare Function actionAccessFormData Lib "weblibvb.vbx" () As Long

' ============================================================================
'  Action functions for WLToolbar control 
' ============================================================================

Declare Function actionCreateToolbar Lib "weblibvb.vbx" (ByVal szMenuText As String) As Long
Declare Function actionDeleteToolbar Lib "weblibvb.vbx" () As Long
Declare Function actionIsToolbarActive Lib "weblibvb.vbx" () As Long
Declare Function actionSetActiveToolbar Lib "weblibvb.vbx" () As Long
Declare Function actionAddToolbarButtonByHandle Lib "weblibvb.vbx" (ByVal nID As Integer, ByVal nIdx As Integer, ByVal szText As String,ByVal bmUp%,ByVal bmSel%,ByVal bmFoc%,ByVal bmDis%,ByVal bCopy As Integer) As Long
Declare Function actionAddToolbarButtonByID Lib "weblibvb.vbx" (ByVal nID As Integer, ByVal nIdx As Integer, ByVal szText As String,ByVal nInst As Integer,ByVal bmUp%,ByVal bmSel%,ByVal bmFoc%,ByVal bmDis%) As Long
Declare Function actionAddToolbarButtonByName Lib "weblibvb.vbx" (ByVal nID As Integer, ByVal nIdx As Integer, ByVal szText As String,ByVal nInst As Integer,ByVal bmUp$,ByVal bmSel$,ByVal bmFoc$,ByVal bmDis$) As Long
Declare Function actionRemoveToolbarButton Lib "weblibvb.vbx" (ByVal nID As Integer) As Long
Declare Function actionIsToolbarButtonVisible Lib "weblibvb.vbx" (ByVal nID As Integer) As Long
Declare Function actionShowToolbarButton Lib "weblibvb.vbx" (ByVal nID As Integer, ByVal bShow As Integer) As Long
Declare Function actionIsToolbarButtonEnabled Lib "weblibvb.vbx" (ByVal nID As Integer) As Long
Declare Function actionEnableToolbarButton Lib "weblibvb.vbx" (ByVal nID As Integer, ByVal bEnable As Integer) As Long
Declare Function actionGetToolbarText Lib "weblibvb.vbx" (ByVal nID As Integer) As Long
Declare Function actionSetToolbarText Lib "weblibvb.vbx" (ByVal nID As Integer, ByVal szText As String) As Long
Declare Function actionGetToolbarFont Lib "weblibvb.vbx" (ByVal nType As Integer) As Long
Declare Function actionSetToolbarFont Lib "weblibvb.vbx" (ByVal nType As Integer, ByVal nFont As Integer) As Long
Declare Function actionGetToolbarBkgnd Lib "weblibvb.vbx" () As Long
Declare Function actionSetToolbarBkgnd Lib "weblibvb.vbx" (ByVal lBkgndColor As Long) As Long
Declare Function actionGetToolbarTextColor Lib "weblibvb.vbx" (ByVal nType As Integer) As Long
Declare Function actionSetToolbarTextColor Lib "weblibvb.vbx" (ByVal nType As Integer, ByVal lTextColor As Long) As Long

