www.pudn.com > wcore.rar > WebCoreBridge.h


/* 
 * Copyright (C) 2003 Apple Computer, Inc.  All rights reserved. 
 * Portions Copyright (c) 2005 Nokia Corporation, Inc. All rights reserved. 
* 
 * Redistribution and use in source and binary forms, with or without 
 * modification, are permitted provided that the following conditions 
 * are met: 
 * 1. Redistributions of source code must retain the above copyright 
 *    notice, this list of conditions and the following disclaimer. 
 * 2. Redistributions in binary form must reproduce the above copyright 
 *    notice, this list of conditions and the following disclaimer in the 
 *    documentation and/or other materials provided with the distribution. 
 * 
 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR 
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
*/ 
 
#ifndef WEBCOREBRIDGE_H 
#define WEBCOREBRIDGE_H 
 
//  INCLUDES 
#include  
#include  
#include  
 
#include "WebCoreKeyboardAccess.h" 
#include "WebCoreKeyValuePair.h" 
#include "WebCoreImageCarrier.h" 
#include "WebCoreFormData.h" 
#include "WebCoreFormDataElement.h" 
#include  
//#import  
 
 
// CONSTANTS 
 
// MACROS 
 
// DATA TYPES 
 
typedef enum { 
    EWebCoreDeviceScreen, 
    EWebCoreDevicePrinter 
} TWebCoreDeviceType; 
 
typedef enum { 
    EWebSelectByMoving, 
    EWebSelectByExtending 
} TWebSelectionAlteration; 
 
typedef enum { 
    EWebSelectForward, 
    EWebSelectBackward, 
    EWebSelectRight, 
    EWebSelectLeft 
} TWebSelectionDirection; 
 
typedef enum { 
    EWebSelectByCharacter, 
    EWebSelectByWord, 
    EWebSelectByLine, 
    EWebSelectByParagraph 
} TWebSelectionGranularity; 
 
 
typedef enum 
{ 
    EWebNavUp, 
    EWebNavDown, 
    EWebNavLeft, 
    EWebNavRight, 
    EWebNavAny 
} TWebNavDirection; 
 
typedef enum 
{ 
    EFontAllSmall, 
    EFontSmaller, 
    EFontNormal, 
    EFontLarger, 
    EFontAllLarge 
} TWebCoreTextSize; 
 
 
typedef enum 
  { 
    DefaultEncoding, 
    AutoDetectedEncoding, 
    EncodingFromXMLHeader, 
    EncodingFromMetaTag, 
    EncodingFromHTTPHeader, 
    UserChosenEncoding 
} TEncodingType; 
 
typedef enum 
  { 
    EWebCoreElementNone, 
    EWebCoreElementImageBox, 
    EWebCoreElementAnchor, 
    EWebCoreElementTelAnchor, 
    EWebCoreElementMailtoAnchor, 
    EWebCoreElementInputBox, 
    EWebCoreElementActivatedInputBox, 
    EWebCoreElementSelectBox, 
    EWebCoreElementButton, 
    EWebCoreElementTextAreaBox, 
    EWebCoreElementRootBox, 
    EWebCoreElementObjectBox, 
    EWebCoreElementActivatedObjectBox, 
    EWebCoreElementDownloadedObjectBox, 
    EWebCoreElementFileSelectionBoxNoContent, 
    EWebCoreElementFileSelectionBoxWithContent, 
    EWebCoreElementAreaBox, 
    EWebCoreElementCheckBoxChecked, 
    EWebCoreElementCheckBoxUnChecked, 
    EWebCoreElementRadioButtonSelected, 
    EWebCoreElementRadioButtonUnSelected, 
    EWebCoreElementMouseButtonListener, 
    EWebCoreElementScrollBar 
  } TWebCoreFocusedElementType; 
 
struct TWebCoreLinkItem 
    { 
    TPtrC iCharset; 
    TPtrC iType; 
    TPtrC iHref; 
    TPtrC iTitle; 
    }; 
 
// FUNCTION PROTOTYPES 
 
// FORWARD DECLARATIONS 
class KWQKHTMLPart; 
class KHTMLView; 
class RenderArena; 
 
namespace khtml { 
    class RenderPart; 
    class RenderObject; 
} 
 
namespace DOM { 
  class NodeImpl; 
} 
 
class CWebCoreSettings; 
class CWebScriptObject; 
 
class CDOMElement; 
 
class MWebClientBridge; 
 
class MWebCoreResourceHandle; 
class MWebCoreResourceLoader; 
class MWebCoreFileButton; 
class MWebCoreFileButtonDelegate; 
class MWebCoreScrollView; 
class MWebCoreObjectWidget; 
class MWebCoreUrlResponseHeaderInfo; 
 
class CWebCoreGraphicsContext; 
class CWebCorePageDataItem; 
 
typedef khtml::RenderPart KHTMLRenderPart; 
 
 
// CLASS DECLARATION 
 
/** 
* CWebCoreBridge, the main bridge interface to the WebCore library 
* 
* WebCoreBridge objects are used by WebCore to abstract away operations that need 
* to be implemented by library clients, for example WebKit. The objects are also 
* used in the opposite direction, for simple access to WebCore functions without dealing 
* directly with the KHTML C++ classes. 
* 
* A WebCoreBridge creates and holds a reference to a KHTMLPart. 
* 
* The MWebCoreBridge interface contains methods for use by the non-WebCore side of the bridge. 
* 
*  @lib WebCore 
*  @since ?Series60_version 
*/ 
class CWebCoreBridge : public CBase 
{ 
    public:  // Constructors and destructor 
 
        /** 
        * Two-phased constructor. 
        */ 
        IMPORT_C static CWebCoreBridge* NewL(MWebClientBridge& aClient); 
 
        /** 
        * Destructor. 
        */ 
        virtual ~CWebCoreBridge(); 
 
    public: // New functions 
 
        /** 
        * ?member_description. 
        * @since ?Series60_version 
        * @param ?arg1 ?description 
        * @return ?description 
        */ 
        //?type ?member_function( ?type ?arg1 ); 
 
        IMPORT_C MWebClientBridge& Client(); 
 
        //  static CWebCoreBridge * BridgeForDOMDocument(DOMDocument *document); 
 
        IMPORT_C void InitializeSettings(const CWebCoreSettings& aSettings); 
 
 
        IMPORT_C void SetRenderPart(KHTMLRenderPart *aRenderPart); 
        IMPORT_C KHTMLRenderPart *RenderPart() const; 
 
 
        IMPORT_C void SetName(const TDesC& aName); 
        IMPORT_C TPtrC Name() const; 
 
        IMPORT_C void SetParent(CWebCoreBridge *aParent); 
 
        IMPORT_C void ProvisionalLoadStarted(); 
 
        IMPORT_C void OpenURL(const TDesC& aURL, TBool aReload, 
            const TDesC& aContentType, const TDesC& aRefresh, const TDateTime& aLastModified); 
 
        IMPORT_C void CreateDocumentWithEncoding(const TDesC& aEncoding, TEncodingType aEncodingType); 
 
        IMPORT_C void AddData(const TDesC8& aData); 
 
        IMPORT_C void CloseURL(); 
 
        IMPORT_C void DidNotOpenURL(const TDesC& aURL); 
 
        IMPORT_C void SaveDocumentState(); 
        IMPORT_C void RestoreDocumentState(); 
 
        IMPORT_C TBool CanCachePage() const; 
//        IMPORT_C TBool SaveDocumentToPageCache(); 
 
        IMPORT_C void End(); 
 
        IMPORT_C TPtrC URL() const; 
        IMPORT_C TPtrC Referrer() const; 
        IMPORT_C TPtrC Domain() const; 
        IMPORT_C HBufC* GetTextContentL(); 
                 
        IMPORT_C TPtrC GetNextRenderTextForSmartLinksL(TBool& aKeepGoing);     
        IMPORT_C void GetRenderTextArea(const TDesC& aText, RArray& aRect); 
 
        IMPORT_C void InstallInFrame(MWebCoreScrollView& aView); 
        IMPORT_C void RemoveFromFrame(); 
 
        IMPORT_C void ScrollToAnchor(const TDesC& aAnchor); 
        IMPORT_C void ScrollToAnchorWithURL(const TDesC& aURL); 
 
        IMPORT_C void CreateKHTMLView(MWebCoreScrollView& aView, TInt aMarginWidth, TInt aMarginHeight); 
 
        IMPORT_C TBool IsFrameSet() const; 
 
        IMPORT_C void ReapplyStylesForDeviceType( TWebCoreDeviceType aDeviceType ); 
        IMPORT_C void ForceLayoutAdjustingViewSize(TBool aAdjustSizeFlag); 
//        IMPORT_C void ForceLayoutWithMinimumPageWidth(TInt aMinPageWidth, TInt aMaxPageWidth, TBool aAdjustSizeFlag); 
        IMPORT_C void SendResizeEvent(); 
        IMPORT_C void SendScrollEvent(); 
        IMPORT_C TBool NeedsLayout() const; 
        IMPORT_C void SetNeedsLayout(); 
 
        IMPORT_C void DrawRect(const TRect& rect, CWebCoreGraphicsContext& aGc); 
        IMPORT_C CArrayFixFlat* ImagesInRect(TBool visibleOnly); 
    IMPORT_C TInt ImageCount(TBool visibleOnly); 
    IMPORT_C void AddToContacts(TPoint& aPoint); 
        IMPORT_C CArrayPtr* GetPageDataL(TInt aTypeMask); 
    IMPORT_C HBufC* GetUrlOfNodeInFocusL(TPoint& aPoint) const; 
 
    IMPORT_C void DumpRenderTree(); 
 
//        IMPORT_C void AdjustPageHeightNew(TInt aNewBottom, TInt aOldTop, TInt aOldBottom, TInt aBottomLimit); 
 
        //- (NSArray*)computePageRectsWithPrintWidthScaleFactor(float)printWidthScaleFactor printHeight(float)printHeight; 
 
//        IMPORT_C void SetUsesInactiveTextBackgroundColor(TBool aUses); 
//        IMPORT_C TBool UsesInactiveTextBackgroundColor(); 
 
//        IMPORT_C void SetShowsFirstResponder(TBool aFlag); 
 
        IMPORT_C void PointerEvent(TPointerEvent aEvent); 
 
        IMPORT_C void PointerEvent(TPointerEvent::TType aEventType, const TPoint &aPosition); 
        IMPORT_C TBool TabbedNavigation(TWebNavDirection aDirection,TWebCoreFocusedElementType &aElType,TBool aInitialize); 
 
        IMPORT_C TBool KeyEvent(TKeyEvent aEvent, TBool aUpEvent); 
 
        IMPORT_C void ActivateEvent(TPoint& aPoint); 
        IMPORT_C void DeActivateEvent(TBool aAcceptChanges); 
 
        IMPORT_C void RemoveFileName( TPoint& aPoint ); 
 
        IMPORT_C void ActivateAccessKeys(TKeyEvent aKeyEvent); 
 
        //- (BOOL)sendContextMenuEvent(NSEvent *)event; // return YES if event is eaten by WebCore 
 
        //- (NSView *)nextKeyView; 
        //- (NSView *)previousKeyView; 
 
        //- (NSView *)nextKeyViewInsideWebFrameViews; 
        //- (NSView *)previousKeyViewInsideWebFrameViews; 
 
        //- (NSObject *)copyDOMTree(id )copier; 
        //- (NSObject *)copyRenderTree(id )copier; 
        //- (NSString *)renderTreeAsExternalRepresentation; 
 
        //- (NSDictionary *)elementAtPoint(NSPoint)point; 
        HBufC* URLWithRelativeString(const TDesC& aString); 
 
        //- (DOMElement *)elementWithName(NSString *)name inForm(DOMElement *)form; 
        //- (DOMElement *)elementForView(NSView *)view; 
        //- (BOOL)elementDoesAutoComplete(DOMElement *)element; 
        //- (BOOL)elementIsPassword(DOMElement *)element; 
        //- (DOMElement *)formForElement(DOMElement *)element; 
        //- (DOMElement *)currentForm; 
        //- (NSArray *)controlsInForm(DOMElement *)form; 
        //- (NSString *)searchForLabels(NSArray *)labels beforeElement(DOMElement *)element; 
        //- (NSString *)matchLabels(NSArray *)labels againstElement(DOMElement *)element; 
 
        /* Search for a keyword string, towards a direction (forward or backward), 
         * returns an integer indicating the search result */ 
        IMPORT_C TInt SearchFor(const TDesC& aString, TBool aForward, TBool aCaseSensitive, TBool aWrap); 
 
        /* Perform a Search for the previously searched string */ 
        IMPORT_C TInt SearchAgain(const TDesC& aString,TBool aForward, TBool aCaseSensitive, TBool aWrap); 
 
        /* change the view port to jump to the selection content */ 
        IMPORT_C void JumpToSelection(); 
 
        /* This is called when user cancel the selection action, 
        * the function will clean up the old selection state, and 
        * undo the selection highlight */ 
        IMPORT_C void ClearFind(); 
 
        IMPORT_C void SetFontSizeLevel( TInt aLevel ); 
 
        IMPORT_C TUint TextEncoding() const; 
 
        //- (NSString *)stringByEvaluatingJavaScriptFromString(NSString *)string; 
 
        //- (DOMDocument *)DOMDocument; 
        //- (DOMHTMLElement *)frameElement; 
 
        //void setSelectionFrom(DOMNode *)start startOffset(int)startOffset to(DOMNode *)end endOffset(int) endOffset; 
 
        //- (BOOL)isSelectionEditable; 
 
//        IMPORT_C TBool HaveSelection() const; 
 
        //- (NSAttributedString *)selectedAttributedString; 
//        IMPORT_C HBufC* SelectedString() const; 
 
        //- (NSString *)stringForRange(DOMRange *)range; 
 
        //- (NSString *)markupStringFromNode(DOMNode *)node nodes(NSArray **)nodes; 
        //- (NSString *)markupStringFromRange(DOMRange *)range nodes(NSArray **)nodes; 
 
//        IMPORT_C void SelectAll(); 
//        IMPORT_C void DeselectAll(); 
//        IMPORT_C void DeselectText(); 
 
//        IMPORT_C TRect SelectionRect(); 
//        IMPORT_C TRect VisibleSelectionRect(); 
        //- (NSImage *)selectionImage; 
 
        //- (DOMNode *)selectionStart; 
        //- (int)selectionStartOffset; 
        //- (DOMNode *)selectionEnd; 
        //- (int)selectionEndOffset; 
        //void setSelectedDOMRange(DOMRange *)range affinity(NSSelectionAffinity)selectionAffinity; 
        //- (DOMRange *)selectedDOMRange; 
        //- (NSSelectionAffinity)selectionAffinity; 
 
        //- (NSAttributedString *)attributedStringFrom(DOMNode *)startNode startOffset(int)startOffset to(DOMNode *)endNode endOffset(int)endOffset; 
        //- (NSFont *)renderedFontForNode(DOMNode *)node; 
 
        //+ (NSString *)stringWithData(NSData *)data textEncoding(CFStringEncoding)textEncoding; 
        //+ (NSString *)stringWithData(NSData *)data textEncodingName(NSString *)textEncodingName; 
 
        //- (BOOL)interceptKeyEvent(NSEvent *)event toView(NSView *)view; 
 
        IMPORT_C void SetShouldCreateRenderers(TBool aCreateRenderers); 
        IMPORT_C TBool ShouldCreateRenderers(); 
 
        IMPORT_C TInt NumPendingOrLoadingRequests(); 
 
        IMPORT_C void SetDrawsBackground(TBool aDrawsBackround); 
 
        IMPORT_C TRgb BodyBackgroundColor(); 
        IMPORT_C TRgb SelectionColor(); 
 
        IMPORT_C void AdjustViewSize(); 
 
        //Method to execute a script 
        IMPORT_C void ExecuteScript(const TDesC& aScriptText); 
 
        IMPORT_C static void UpdateAllViews(); 
 
        //Method to set the scaling factor of the document 
        IMPORT_C void ScalingFactorChanged(TInt aFactor); 
        IMPORT_C TBool NavigableNodeUnderCursor(TPoint &aPoint, TWebCoreFocusedElementType &aElType, TRect& aFocusRect) const; 
        IMPORT_C TBool DetermineCursorPosition(TWebCoreFocusedElementType &aElType, TRect& aFocusRect,TRect& aSearchRect, TPoint &aCursorPosition, TBool aInitialize); 
 
        //- (id)accessibilityTree; 
 
        //void undoEditing(id)arg; 
        //void redoEditing(id)arg; 
 
        //- (DOMRange *)selectedDOMRangeWithGranularity(WebSelectionGranularity)granularity; 
        //- (DOMRange *)rangeByAlteringCurrentSelection(WebSelectionAlteration)alteration direction(WebSelectionDirection)direction granularity(WebSelectionGranularity)granularity; 
        //void alterCurrentSelection(WebSelectionAlteration)alteration direction(WebSelectionDirection)direction granularity(WebSelectionGranularity)granularity; 
 
        //- (DOMDocumentFragment *)documentFragmentWithMarkupString(NSString *)markupString baseURLString(NSString *)baseURLString; 
        //- (DOMDocumentFragment *)documentFragmentWithText(NSString *)text; 
 
        //void replaceSelectionWithFragment(DOMDocumentFragment *)fragment selectReplacement(BOOL)selectReplacement; 
        //void replaceSelectionWithNode(DOMNode *)node selectReplacement(BOOL)selectReplacement; 
        //void replaceSelectionWithMarkupString(NSString *)markupString baseURLString(NSString *)baseURLString selectReplacement(BOOL)selectReplacement; 
        //void replaceSelectionWithText(NSString *)text selectReplacement(BOOL)selectReplacement; 
 
        //void insertText(NSString *)text; 
        //void insertNewline; 
 
        //void setSelectionToDragCaret; 
        //void moveSelectionToDragCaret(DOMDocumentFragment *)selectionFragment; 
        //void moveDragCaretToPoint(NSPoint)point; 
        //void removeDragCaret; 
        //- (DOMRange *)dragCaretDOMRange; 
        //- (DOMRange *)editableDOMRangeForPoint(NSPoint)point; 
 
        //void deleteSelection; 
        //void deleteKeyPressed; 
        //void applyStyle(DOMCSSStyleDeclaration *)style; 
        //- (NSFont *)fontForCurrentPosition; 
        //void ensureCaretVisible; 
 
        //- (WebScriptObject *)windowScriptObject; 
 
        //- (NSDragOperation)dragOperationForDraggingInfo(id )info; 
        //void dragExitedWithDraggingInfo(id )info; 
        //- (BOOL)concludeDragForDraggingInfo(id )info; 
        //void dragSourceMovedTo(NSPoint)windowLoc; 
        //void dragSourceEndedAt(NSPoint)windowLoc operation(NSDragOperation)operation; 
 
        //- (BOOL)tryDHTMLCut; 
        //- (BOOL)tryDHTMLCopy; 
        //- (BOOL)tryDHTMLPaste; 
 
 
        KWQKHTMLPart *Part() const; 
 
        IMPORT_C TBool HasPendingLayout() const; 
 
        //Method to resolve the URL when the base url and resource url are specified 
        IMPORT_C static HBufC* ResolveUrlL(const TDesC &aBaseUrl, const TDesC &aResUrl); 
 
        IMPORT_C void SetFastFirstDisplayMode(TBool aFastMode); 
        IMPORT_C TBool FastFirstDisplayMode() const; 
 
        IMPORT_C TBool ShowingFastPreview() const; 
 
        IMPORT_C void FindLinksOfType(const TDesC& aType, RArray& aResult); 
 
        //Used to auto fill password when login/username is filled 
        IMPORT_C void SetFormControlTextByName(const TDesC& aName, const TDesC& aValue); 
 
        // set the maximum width used for formatting text 
        IMPORT_C void SetMaxBidiWidth(TInt aWidth); 
 
        // load and replace missing images for the document 
        IMPORT_C void LoadImages(); 
 
        // clear all static data before application exits, 
        // this function can only be called once. 
        IMPORT_C static void PrepareForExit(); 
 
        IMPORT_C static void SetDefersTimers(TBool aDefer); 
        IMPORT_C static TBool DefersTimers(); 
 
    private: 
 
        /** 
        * C++ default constructor. 
        */ 
        CWebCoreBridge(MWebClientBridge& aClient); 
 
 
        /** 
        * By default Symbian 2nd phase constructor is private. 
        */ 
        void ConstructL(); 
 
    private : // new functions 
 
        TWebCoreFocusedElementType NodeTypeB( DOM::NodeImpl* aFocusNode ) const; 
 
    protected:  // Data 
        // KQK part object, owned by the bridge 
        KWQKHTMLPart *iPart; 
        // renderer pointer 
        KHTMLRenderPart *iRenderPart; 
        // memory pool for the bridge 
        RenderArena *iRenderPartArena; 
        // true if a rendering tree is to be build for this bridge 
        TBool iShouldCreateRenderers; 
        // pointer to the client side bridge interface 
        MWebClientBridge* iClientBridge; 
        //pointer for render text object for smart link parsing  
        DOM::NodeImpl* iSmartLinkNode; 
        //pointer for smart text buffer 
        HBufC* iSmartTextBuffer; 
         
    }; 
 
 
 
// CLASS DECLARATION 
// 
/** 
* The MWebCoreBridge interface contains methods for use by the WebCore side of the bridge. 
* 
*  @lib WebCore 
*  @since ?Series60_version 
*/ 
class MWebClientBridge 
 
{ 
 
public: 
    virtual CArrayPtrFlat* ChildFrames() = 0; 
    virtual CWebCoreBridge *MainFrame() = 0; 
    virtual CWebCoreBridge *FindFrameNamed(const TDesC& aName) = 0; 
 
    /* Creates a name for an frame unnamed in the HTML.  It should produce repeatable results for loads of the same frameset. */ 
    virtual HBufC* GenerateFrameName() = 0; 
    virtual void FrameDetached() = 0; 
    virtual MWebCoreScrollView& DocumentView() = 0; 
 
    virtual void LoadUrl(const TDesC& aURL, const TDesC& aRereferrer, TBool aReload, TBool aUserGesture, const TDesC& aTarget, 
        TEventCode aTriggeringEvent) = 0; 
    virtual void PostWithURL(const TDesC& aURL, const TDesC& aRereferrer, const TDesC& aTarget, const RArray& data, 
        const TDesC& aContentType, TEventCode aTriggeringEvent) = 0; 
 
    virtual CWebCoreBridge* CreateWindowWithUrl(const TDesC& aURL, const TDesC& aFrameName, 
                                               TBool aUserInitiated) = 0; 
    virtual void ShowWindow() = 0; 
 
    virtual TPtrC UserAgentForURL(const TDesC& aURL) = 0; 
 
    virtual void SetTitle(const TDesC& aTitle) = 0; 
    virtual void SetStatusText(const TDesC& aStatus) = 0; 
 
    virtual void NotifyMetaData(const TDesC& aName,const TDesC& aValue) = 0; 
    virtual TBool IsTabbedNavigationEnabled() = 0; 
 
    virtual void SetIconURL(const TDesC& aURL) = 0; 
    virtual void SetIconURL(const TDesC& aURL, const TDesC& aWithType) = 0; 
 
    virtual CWebCoreBridge *CreateChildFrameNamed(const TDesC& aFrameName, const TDesC& aURL, const TDesC& aReferrer, 
        KHTMLRenderPart *aRenderPart, 
        TBool aAllowsScrolling, TInt aMarginWidth, TInt aMarginHeight) = 0; 
 
    virtual TBool AreToolbarsVisible() const = 0; 
    virtual void SetToolbarsVisible(TBool aVisible) = 0; 
    virtual TBool IsStatusBarVisible() const = 0; 
    virtual void SetStatusBarVisible(TBool aVisible) = 0; 
    virtual TBool AreScrollbarsVisible() const = 0; 
    virtual void SetScrollbarsVisible(TBool aVisible) = 0; 
//  virtual CCoeControl* Window() const = 0; 
    virtual void SetWindowFrame(TRect aFrame) = 0; 
    virtual TRect WindowFrame() const = 0; 
    virtual void SetWindowContentRect(TRect aFrame) = 0; 
    virtual TRect WindowContentRect() const = 0; 
 
    virtual void SetWindowIsResizable(TBool aResizable) = 0; 
    virtual TBool WindowIsResizable() const = 0; 
 
//- (NSResponder *)firstResponder; 
//void makeFirstResponder(NSResponder *)view; 
 
    virtual void CloseWindowSoon() = 0; 
 
    virtual void RunJavaScriptAlertPanelWithMessage(const TDesC& aMessage) = 0; 
    virtual TBool RunJavaScriptConfirmPanelWithMessage(const TDesC& aMessage, const TDesC& aYes,const TDesC& aNo) = 0; 
    virtual TBool RunJavaScriptTextInputPanelWithPrompt(const TDesC& aPrompt, const TDesC& aDefaultText, HBufC** returningText) = 0; 
//void addMessageToConsole(NSDictionary *)message; 
 
    virtual MWebCoreResourceHandle* StartLoadingResource(MWebCoreResourceLoader& aLoader, const TDesC& aURL, CArrayFix* aCustomHeaders) = 0; 
    virtual MWebCoreResourceHandle* StartLoadingResource(MWebCoreResourceLoader& aLoader, const TDesC& aURL, CArrayFix* aCustomHeaders, const RArray& aData) = 0; 
    virtual void ObjectLoadedFromCacheWithURL( const TDesC& aURL, MWebCoreUrlResponseHeaderInfo* aResponse, const TDesC8& aAllData ) = 0; 
 
//- (NSData *)syncLoadResourceWithURL(NSURL *)URL customHeaders(NSDictionary *)requestHeaders postData(NSData *)postData finalURL(NSURL **)finalNSURL responseHeaders(NSDictionary **)responseHeaderDict statusCode(int *)statusCode; 
 
    virtual TBool IsReloading() const = 0; 
    virtual TBool IsMultipart() const = 0; 
    virtual TDateTime ExpiresTimeForResponse( MWebCoreUrlResponseHeaderInfo* aResponse ) = 0; 
 
    virtual void ReportClientRedirectToURL(const TDesC& aURL, TInt aDelaySeconds, TDateTime aFireDate, TBool lockHistory, TBool aIsJavaScriptFormAction) = 0; 
    virtual void ReportClientRedirectCancelled(TBool aCancelWithLoadInProgress) = 0; 
 
    virtual void FocusWindow() = 0; 
    virtual void UnfocusWindow() = 0; 
 
//- (NSView *)nextKeyViewOutsideWebFrameViews; 
//- (NSView *)previousKeyViewOutsideWebFrameViews; 
 
    virtual TBool DefersLoading() = 0; 
    virtual void SetDefersLoading(TBool aLoading) = 0; 
 
    virtual void SaveFormData(const CArrayPtrFlat& aFormData) = 0;  
 
    virtual void SaveDocumentState(const TArray& aDocumentState) = 0; 
    virtual TArray* DocumentState() const = 0; 
 
    virtual void Reload() = 0; 
 
    virtual void SetNeedsReapplyStyles() = 0; 
 
// This URL is only used for coloring visited links. 
    virtual TPtrC RequestedURLString() const = 0; 
    virtual TPtrC IncomingReferrer() const = 0; 
 
    virtual MWebCoreObjectWidget* ViewForPluginWithURL( const TDesC& aUrl, 
                                                        const CArrayFix& aAttributeNames, 
                                                        const CArrayFix& aAttributeValues, 
                                                        const TDesC& aBaseUrl, 
                                                        const TDesC& aMIMEType, 
                                                        TBool aCanLoadPluginContent) = 0; 
 
//- (NSView *)viewForJavaAppletWithFrame(NSRect)frame 
//                        attributeNames:(NSArray *)attributeNames 
//                        attributeValues:(NSArray *)attributeValues 
//                                baseURL:(NSURL *)baseURL; 
 
//- (BOOL)saveDocumentToPageCache(id)documentInfo; 
 
    virtual TInt GetObjectCacheSize() = 0; 
 
    virtual TBool FrameRequiredForMIMEType(const TDesC& aMIMEType, const TDesC& aURL) = 0; 
 
    virtual void LoadEmptyDocumentSynchronously() = 0; 
 
    virtual HBufC* MimeTypeForFileName(const TDesC& aPath) = 0; 
 
//void allowDHTMLDrag(BOOL *)flagDHTML UADrag(BOOL *)flagUA; 
//- (BOOL)startDraggingImage(NSImage *)dragImage at(NSPoint)dragLoc operation(NSDragOperation)op event(NSEvent *)event sourceIsDHTML(BOOL)flag DHTMLWroteData(BOOL)dhtmlWroteData; 
//void handleAutoscrollForMouseDragged(NSEvent *)event; 
//- (BOOL)mayStartDragWithMouseDragged(NSEvent *)event; 
 
    virtual TInt HistoryLength() = 0; 
    virtual void GoBackOrForward(TInt aDistance) = 0; 
    virtual TBool CanGoBackOrForward(TInt aDistance) = 0; 
 
//void controlTextDidBeginEditing(NSNotification *)obj; 
//void controlTextDidEndEditing(NSNotification *)obj; 
//void controlTextDidChange(NSNotification *)obj; 
 
//- (BOOL)control(NSControl *)control textShouldBeginEditing(NSText *)fieldEditor; 
//- (BOOL)control(NSControl *)control textShouldEndEditing(NSText *)fieldEditor; 
//- (BOOL)control(NSControl *)control didFailToFormatString(NSString *)string errorDescription(NSString *)error; 
//void control(NSControl *)control didFailToValidatePartialString(NSString *)string errorDescription(NSString *)error; 
//- (BOOL)control(NSControl *)control isValidObject(id)obj; 
//- (BOOL)control(NSControl *)control textView(NSTextView *)textView doCommandBySelector(SEL)commandSelector; 
 
//- (NSView  *)fileButtonWithDelegate(id )delegate; 
 
    virtual void SetHasBorder(TBool aHasBorder) = 0; 
 
//    virtual TWebCoreKeyboardUIMode KeyboardUIMode() = 0; 
 
    virtual void DidSetName(const TDesC& aName) = 0; 
 
//- (NSFileWrapper *)fileWrapperForURL(NSURL *)URL; 
 
    virtual void Print() = 0; 
 
//- (jobject)pollForAppletInView(NSView *)view; 
 
//- (NSUndoManager *)undoManager; 
//void issueCutCommand; 
//void issueCopyCommand; 
//void issuePasteCommand; 
//void respondToChangedSelection; 
//void respondToChangedContents; 
//- (BOOL)interceptEditingKeyEvent(NSEvent *)event; 
//void setIsSelected(BOOL)isSelected forView(NSView *)view; 
//- (BOOL)isEditable; 
//- (BOOL)shouldBeginEditing(DOMRange *)range; 
//- (BOOL)shouldEndEditing(DOMRange *)range; 
 
    virtual TPtrC OverrideMediaType() const = 0; 
 
    virtual void WindowObjectCleared() = 0; 
 
    // called when document layout changes (from KHTMLView::layout()) 
    virtual void LayoutChanged() = 0; 
 
    // called when a new document is created ( CreatDocumentWithEncoding() ) 
    virtual void DocumentStarted() = 0; 
 
    // called when parsing the document is finished (from KHTMLPart::slotFinishedParsing() ) 
    virtual void DocumentComplete() = 0; 
 
    // called when cursor position changes. aCursorArea is the cotaining rect of the link box 
    virtual void SetCursorPosition(const TPoint& aCursorPos, TWebCoreFocusedElementType aElementType) = 0; 
 
    virtual TBool IsObjectAvailableInDiskCache(const TDesC& aUrl) = 0; 
 
    //Used to auto fill password when login/username is filled 
    virtual void SetFormControlTextByName(const TDesC& aName, const TDesC& aValue) = 0; 
 
    virtual TBool CancelInProgress() = 0; 
}; 
 
#endif      // WEBCOREBRIDGE_H 
 
// End of File