21 |
21 |
22 // INCLUDES |
22 // INCLUDES |
23 #include <e32std.h> |
23 #include <e32std.h> |
24 #include <eikscrlb.h> |
24 #include <eikscrlb.h> |
25 #include "platform/Shared.h" |
25 #include "platform/Shared.h" |
26 #include <brctldefs.h> |
26 #include "BrCtlDefs.h" |
27 #include "PageScaler.h" |
27 #include "pagescaler.h" |
28 #include "Timer.h" |
28 #include "Timer.h" |
29 #include <MemoryManager.h> |
29 #include "MemoryManager.h" |
30 #include <stmgesturelistener.h> |
|
31 |
30 |
32 namespace WebCore |
31 namespace WebCore |
33 { |
32 { |
34 class String; |
33 class String; |
35 class Page; |
34 class Page; |
36 class DOMDocument; |
35 class DOMDocument; |
37 class FormState; |
36 class FormState; |
38 class Element; |
37 class Element; |
39 class Frame; |
38 class Frame; |
40 } |
|
41 |
|
42 namespace KJS |
|
43 { |
|
44 class PausedTimeouts; |
|
45 } |
39 } |
46 |
40 |
47 class CPluginHandler; |
41 class CPluginHandler; |
48 class WebPreferences; |
42 class WebPreferences; |
49 class WebBackForwardList; |
43 class WebBackForwardList; |
70 class WebPageZoomHandler; |
64 class WebPageZoomHandler; |
71 class WebPointerEventHandler; |
65 class WebPointerEventHandler; |
72 class WebPageFullScreenHandler; |
66 class WebPageFullScreenHandler; |
73 class WebFrameView; |
67 class WebFrameView; |
74 class WebFrameBridge; |
68 class WebFrameBridge; |
75 class WebPagePinchZoomHandler; |
|
76 class CThumbnailGenerator; |
|
77 class PluginSkin; |
|
78 |
69 |
79 |
70 |
80 const TUint KMouseEventFired = 0x00000001; |
71 const TUint KMouseEventFired = 0x00000001; |
81 const TUint KKeyEventFired = 0x00000002; |
72 const TUint KKeyEventFired = 0x00000002; |
82 |
73 |
165 TSize maxBidiSize() const; |
156 TSize maxBidiSize() const; |
166 void clearOffScreenBitmap(); |
157 void clearOffScreenBitmap(); |
167 void scrollBuffer(TPoint aTo, TPoint aFrom, TBool aMayUseCopyScroll); |
158 void scrollBuffer(TPoint aTo, TPoint aFrom, TBool aMayUseCopyScroll); |
168 TRect offscreenRect() const {return m_offscreenrect;} |
159 TRect offscreenRect() const {return m_offscreenrect;} |
169 CPageScaler* pageScaler() const{ return m_pageScaler; } |
160 CPageScaler* pageScaler() const{ return m_pageScaler; } |
170 CThumbnailGenerator* pageThumbnailGenerator()const { return m_thumbnailGenerator;} |
|
171 //void updateScrollBarsL(CEikScrollBar::TOrientation aOrientation, const TInt aThumbPos, const int aScrollSpan); |
161 //void updateScrollBarsL(CEikScrollBar::TOrientation aOrientation, const TInt aThumbPos, const int aScrollSpan); |
172 int scalingFactor() const; |
162 int scalingFactor() const; |
173 void openUrl(const TDesC& url); |
163 void openUrl(const TDesC& url); |
174 CBrCtl* brCtl() const { return m_brctl; } |
164 CBrCtl* brCtl() const { return m_brctl; } |
175 CWebFepTextEditor* fepTextEditor() { return m_webfeptexteditor; } |
165 CWebFepTextEditor* fepTextEditor() { return m_webfeptexteditor; } |
350 |
347 |
351 /** |
348 /** |
352 * Collects offscreen bitmap |
349 * Collects offscreen bitmap |
353 */ |
350 */ |
354 void collectOffscreenbitmapL(CFbsBitmap& snapshot); |
351 void collectOffscreenbitmapL(CFbsBitmap& snapshot); |
355 |
352 |
356 /** |
|
357 * To get the pinch zoom handler |
|
358 */ |
|
359 WebPagePinchZoomHandler* pinchZoomHandler() { return m_pinchZoomHandler; } |
|
360 |
|
361 /** |
|
362 * To set the Bitmap zooming for Pinch |
|
363 */ |
|
364 void setPinchBitmapZoomLevelL(int zoomLevel); |
|
365 |
|
366 /** |
|
367 * To set the Bitmap zooming In for Pinch |
|
368 */ |
|
369 void setPinchBitmapZoomIn(int zoomLevel); |
|
370 |
|
371 /** |
|
372 * To set the Bitmap zooming Out for Pinch |
|
373 */ |
|
374 void setPinchBitmapZoomOutL(int zoomLevel); |
|
375 |
|
376 TBool isPinchZoom() {return m_isPinchZoom; } |
|
377 |
|
378 /** |
|
379 * Creates the checkerboard |
|
380 */ |
|
381 void createCheckerBoardL(); |
|
382 |
|
383 /** |
|
384 * Destroys the checkerboard |
|
385 */ |
|
386 void destroyCheckerBoard(); |
|
387 |
|
388 /** |
|
389 * Starts the checkerboard timer. End of this timer, checkerboard will be destroyed. |
|
390 */ |
|
391 void startCheckerBoardDestroyTimer(); |
|
392 |
|
393 void scrollStatus(bool status); |
|
394 public: // from MPageScalerCallback |
353 public: // from MPageScalerCallback |
395 /** |
354 /** |
396 * |
355 * |
397 * @since 3.1 |
356 * @since 3.1 |
398 * @param |
357 * @param |
511 TUint correctKeyCode(); |
470 TUint correctKeyCode(); |
512 bool handleNaviKeyEvent(const TKeyEvent& keyevent, TEventCode eventcode, WebCore::Frame* frame); |
471 bool handleNaviKeyEvent(const TKeyEvent& keyevent, TEventCode eventcode, WebCore::Frame* frame); |
513 bool handleMSK(const TKeyEvent& keyevent, TEventCode eventcode, WebCore::Frame* frame); |
472 bool handleMSK(const TKeyEvent& keyevent, TEventCode eventcode, WebCore::Frame* frame); |
514 void sendMouseEventToEngineIfNeeded(TPointerEvent::TType eventType, TPoint pos, WebCore::Frame* frame); |
473 void sendMouseEventToEngineIfNeeded(TPointerEvent::TType eventType, TPoint pos, WebCore::Frame* frame); |
515 void setFocusedNodeUnderCursor(WebCore::Frame* frame); |
474 void setFocusedNodeUnderCursor(WebCore::Frame* frame); |
516 void waitTimerCB(WebCore::Timer<WebView>* t); |
475 |
517 void calculateZoomRect(TRect &aOldRect, TRect &aNewRect, TInt aOldZoom, TInt aNewZoom); |
|
518 public: |
476 public: |
519 void sendMouseEventToEngine(TPointerEvent::TType eventType, TPoint pos, WebCore::Frame* frame); |
477 void sendMouseEventToEngine(TPointerEvent::TType eventType, TPoint pos, WebCore::Frame* frame); |
520 void fepTimerFired(WebCore::Timer<WebView>*); |
478 void fepTimerFired(WebCore::Timer<WebView>*); |
521 void fepVKBTimerFired(WebCore::Timer<WebView>*); |
479 void fepVKBTimerFired(WebCore::Timer<WebView>*); |
522 bool isClosing() const { return m_isClosing; } |
480 bool isClosing() const { return m_isClosing; } |
533 void setKeyEventFired() { m_firedEvent |= KKeyEventFired; } |
491 void setKeyEventFired() { m_firedEvent |= KKeyEventFired; } |
534 void clearMouseEventFired() { m_firedEvent &= ~KMouseEventFired; } |
492 void clearMouseEventFired() { m_firedEvent &= ~KMouseEventFired; } |
535 void clearKeyEventFired() { m_firedEvent &= ~KKeyEventFired; } |
493 void clearKeyEventFired() { m_firedEvent &= ~KKeyEventFired; } |
536 void clearEventFired() { m_firedEvent = 0; } |
494 void clearEventFired() { m_firedEvent = 0; } |
537 |
495 |
538 void wait(double t); |
|
539 |
|
540 // JavaScript timers - pause and resume |
|
541 void pauseJsTimers(); |
|
542 void resumeJsTimers(); |
|
543 bool jsTimersPaused() { return (m_jsTimeouts) ? true : false; } |
|
544 void resetJsTimers() { m_jsTimeouts = 0; } |
|
545 |
|
546 WebCoreGraphicsContext* getGraphicsContext() {return m_webcorecontext; } |
|
547 private: |
496 private: |
548 WebCore::Page* m_page; |
497 WebCore::Page* m_page; |
549 WebFrameView* m_frameView; |
498 WebFrameView* m_frameView; |
550 WebFrameBridge* m_bridge; |
499 WebFrameBridge* m_bridge; |
551 CBrCtl* m_brctl; |
500 CBrCtl* m_brctl; |
609 TRect m_srcRectForZooming; |
558 TRect m_srcRectForZooming; |
610 TRect m_destRectForZooming; |
559 TRect m_destRectForZooming; |
611 int m_startZoomLevel; |
560 int m_startZoomLevel; |
612 bool m_dirtyZoomMode; |
561 bool m_dirtyZoomMode; |
613 bool m_zoomLevelChangedByUser; |
562 bool m_zoomLevelChangedByUser; |
|
563 bool m_isPluginsVisible; |
614 bool m_historyLoad; |
564 bool m_historyLoad; |
615 bool m_redirectWithLockedHistory; |
565 bool m_redirectWithLockedHistory; |
616 // full screen mode |
566 // full screen mode |
617 WebPageFullScreenHandler* m_pageFullScreenHandler; // owned |
567 WebPageFullScreenHandler* m_pageFullScreenHandler; // owned |
618 bool m_viewIsScrolling; |
568 bool m_viewIsScrolling; |
619 bool m_viewIsFastScrolling; |
569 bool m_viewIsFastScrolling; |
|
570 TPoint* m_ptrbuffer; |
620 |
571 |
621 // synchronous requests |
572 // synchronous requests |
622 bool m_synchRequestPending; |
573 bool m_synchRequestPending; |
623 //Indicates any plugin is activated/deactivated |
574 //Indicates any plugin is activated/deactivated |
624 bool m_showCursor; |
575 bool m_showCursor; |
625 bool m_allowRepaints; |
576 bool m_allowRepaints; |
626 bool m_prevEditMode; |
577 bool m_prevEditMode; |
627 int m_firedEvent; |
578 int m_firedEvent; |
628 |
|
629 CActiveSchedulerWait* m_waiter; |
|
630 WebCore::Timer<WebView>* m_waitTimer; |
|
631 |
|
632 //Pinch Zoom Handler |
|
633 WebPagePinchZoomHandler* m_pinchZoomHandler; |
|
634 TBool m_isPinchZoom; |
|
635 TRealPoint m_pinchDocDelta; |
|
636 int m_drawsMissed; |
|
637 CThumbnailGenerator* m_thumbnailGenerator; |
|
638 |
|
639 CFbsBitmap *m_checkerBoardBitmap; |
|
640 CFbsBitmapDevice *m_checkerBoardDevice; |
|
641 CFbsBitGc *m_checkerBoardGc; |
|
642 |
|
643 CPeriodic *m_checkerBoardDestroyTimer; |
|
644 |
|
645 TBool m_isPinchZoomOut; |
|
646 |
|
647 // JavaScript (DOMWindowTimer) timers |
|
648 KJS::PausedTimeouts* m_jsTimeouts; |
|
649 |
|
650 TBool m_scrollingstatus; |
|
651 }; |
579 }; |
652 |
580 |
653 #endif |
581 #endif |
654 |
582 |
655 |
583 |