📄 basesite.h
字号:
* _ExitForceRedraw * Purpose: * Serialize our drawing routines */ virtual void _ExitForceRedraw() = 0; /************************************************************************ * Method: * _SendOSUpdateMessage * Purpose: * Instruct the window to update itself */ virtual void _SendOSUpdateMessage() = 0; /************************************************************************ * Method: * _ShowSite * Purpose: * Show/hide the site */ virtual void _ShowSite(BOOL bShow) = 0; /************************************************************************ * Method: * _AtSystemTime * Purpose: * Determines if this call is on the main app thread */ virtual BOOL _AtSystemTime() = 0; /************************************************************************ * Method: * _EventOccurred * Purpose: * Process the current event */ virtual HX_RESULT _EventOccurred(HXxEvent* /*IN*/ pEvent) = 0; /************************************************************************ * Method: * _GetDeviceCaps * Purpose: * Query the current display mode for bit depth, width and height */ virtual void _GetDeviceCaps( void* hdc, UINT16& uBitesPerPixel, UINT16& uHorzRes, UINT16& uVertRes) = 0; /************************************************************************ * Method: * _GetWindowRect * Purpose: * Get the screen coordinates of the window */ virtual void _GetWindowRect(HXxRect* destRect) = 0; /************************************************************************ * Method: * _DestroySliders * Purpose: * Destroys the x/y scroll bars */ virtual void _DestroySliders() = 0; /************************************************************************ * Method: * _HandleOSEvents * Purpose: * Handle this event */ virtual BOOL _HandleOSEvents(HXxEvent* /*IN*/ pEvent) = 0; /************************************************************************ * Method: * _ConvertToHXEvent * Purpose: * Convert an OS event to a Helix event */ virtual BOOL _ConvertToHXEvent( HXxEvent* pEvent ) = 0; /************************************************************************ * Method: * _GenerateOSEvent * Purpose: * Generate an OS event from a Helix event */ virtual void _GenerateOSEvent(HXxEvent* pEvent, HXxEvent* pEvent2) = 0; /************************************************************************ * Method: * _GenerateSetCursorEvent * Purpose: * Generate as OS set cursor event */ virtual void _GenerateSetCursorEvent() = 0; /************************************************************************ * Method: * _EnterFullScreen * Purpose: * Enter into full screen display mode */ virtual HX_RESULT _EnterFullScreen() = 0; /************************************************************************ * Method: * _ExitFullScreen * Purpose: * Leave full screen display mode */ virtual HX_RESULT _ExitFullScreen() = 0; /************************************************************************ * Method: * _TestFullScreen * Purpose: * Test full screen performance */ virtual HX_RESULT _TestFullScreen( void* hTestBitmap, const char* pszStatusText) = 0; /************************************************************************ * Method: * _TryCreateXSlider * Purpose: * Create a horizontal scroll bar */ virtual void _TryCreateXSlider() = 0; /************************************************************************ * Method: * _SetXSliderValues * Purpose: * Set the range and step size of the horizontal scroll bar */ virtual void _SetXSliderValues(INT32 range, INT32 pageSize) = 0; /************************************************************************ * Method: * _TryCreateYSlider * Purpose: * Create a vertical scroll bar */ virtual void _TryCreateYSlider() = 0; /************************************************************************ * Method: * _SetYSliderValues * Purpose: * Set the range and step size of the vertical scroll bar */ virtual void _SetYSliderValues(INT32 range, INT32 pageSize) = 0; /************************************************************************ * Method: * _GetSystemSizeOfSliders * Purpose: * Get the pixel size of a scroll bar */ virtual void _GetSystemSizeOfSliders(INT32* pWidth, INT32* pHeight) = 0; /************************************************************************ * Method: * _IsWindowVisible * Purpose: * Is this site's window visible */ virtual BOOL _IsWindowVisible() = 0; /************************************************************************ * Method: * _ShowXSlider * Purpose: * Show/hide the horizontal scroll bar */ virtual void _ShowXSlider(BOOL bShow) = 0; /************************************************************************ * Method: * _MoveXSlider * Purpose: * Set the size and position of the horizontal scroll bar */ virtual void _MoveXSlider(INT32 left, INT32 top, INT32 right, INT32 bottom, BOOL bRedraw) = 0; /************************************************************************ * Method: * _ShowXSlider * Purpose: * Show/hide the vertical scroll bar */ virtual void _ShowYSlider(BOOL bShow) = 0; /************************************************************************ * Method: * _MoveYSlider * Purpose: * Set the size and position of the vertical scroll bar */ virtual void _MoveYSlider(INT32 left, INT32 top, INT32 right, INT32 bottom, BOOL bRedraw) = 0; /************************************************************************ * Method: * _DoesXSliderExist * Purpose: * Have we created a horizontal slider */ virtual BOOL _DoesXSliderExist() = 0; /************************************************************************ * Method: * _GetContainingWindow * Purpose: * Get the window that contains the full screen window */ virtual void*_GetContainingWindow() = 0; // XXXAH void*? Not HXxWindow?? /************************************************************************ * Method: * _GetCursorPos * Purpose: * Get the position of the cursor in screen coordinates */ virtual void _GetCursorPos(HXxPoint* pPoint) = 0; /************************************************************************ * Method: * _MapPointToOSWindow * Purpose: * Find which window contains this point */ virtual void _MapPointToOSWindow(HXxPoint* pPt, void** pWindowHandle) = 0; /************************************************************************ * Method: * _GetWindowWithCursor * Purpose: * This returns the OS specific window handle, as void*, that the * pointer is currently in. */ virtual void* _GetWindowWithCursor() = 0; /************************************************************************ * Method: * _ReInitPrimarySurface * Purpose: * Restore the primary surface, if necessary, after a mode/resolution * change. */ virtual void _ReInitPrimarySurface() = 0; // XXXAH may want to move this to root. /************************************************************************ * Method: * _MoveWindow * Purpose: * Change the size and position of the window. For the top level * site, these are screen coordinates, for children sites, they * are relative. */ virtual BOOL _MoveWindow( void* , INT32 X, INT32 Y, INT32 nWidth, INT32 nHeight, BOOL bRepaint) = 0; /************************************************************************ * Method: * _UpdateWindow * Purpose: * Sends an OS message to the window to updat the client area */ virtual BOOL _UpdateWindow(void* hWnd) = 0; /************************************************************************ * Method: * _ShowWindow * Purpose: * Show/hide the window */ virtual BOOL _ShowWindow(void* hWnd, INT32 nCmdShow) = 0; /************************************************************************ * Method: * _SetWindowPos * Purpose: * Sets the size, position, and z-order of the window */ virtual BOOL _SetWindowPos(void* hWnd, void* hWndInsertAfter, INT32 X, INT32 Y, INT32 cx, INT32 cy, INT32 uFlags) = 0; virtual void _DrawFocusRect(UCHAR* pImage, HXBitmapInfoHeader* pImageInfo, HXxRect* pImageSize, void* pOsSpecificData=NULL); BOOL HasFocusRect() {return m_rcFocusRect.bRectActive;} void ManageExposeEvents( HXxRect* dirtyRect ); void _RecursiveDamageRect( HXxRect* dirtyRect, BOOL bForce=FALSE ); void DamageRectWindowRel(HXxRect rect); // this is going to be a nice one. virtual BOOL _SetWindowRgn(void* hWnd, HXREGION* hRgn, BOOL bRedraw) = 0; // XXXAH it would be nice to get the return value here virtual void _SetFocus(void* pWindow) = 0; BOOL _TakesPartInAlphaChain(); HXREGION* Transition(INT32 left, INT32 top, INT32 right, INT32 bottom, tranLines* lines = NULL); //XXXgfw just some hacks to help us get trylocks with the top //level site mutexes. void _TLSLock(); void _TLSUnlock(); BOOL _TLSIsLocked(); inline BOOL SiteScaleingInfoAvailable(){ return m_bSiteScalingInfo; } protected: void _HandleMouseEvent(HXxEvent* pEvent); CHXBaseSite* _GetSiteFromPixel(HXxPoint& point); virtual void CreateColorAccess(IUnknown* pUnk) {zm_pColorAcc = new ColorFuncAccess(pUnk);} INT32 m_nTLSMutexLockCount; UINT32 m_ulTLSMutexOwningThread; HXThread* m_pDummyThread; BOOL m_bMoving; BOOL m_bUserWantsSubRects; BOOL m_bSiteScalingInfo;};class BaseSiteCallback : public IHXCallback{ public: CHXBaseSite* m_pSite; CBaseSurface* m_pSurf; BaseSiteCallback(CHXBaseSite* pSite); ~BaseSiteCallback(); /* * IUnknown methods */ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj); STDMETHOD_(ULONG32,AddRef) (THIS); STDMETHOD_(ULONG32,Release) (THIS); /* * IHXCallback methods */ STDMETHOD(Func) (THIS); protected: LONG32 m_lRefCount;};class ScrollSiteCallback : public IHXCallback{public: ScrollSiteCallback(CHXBaseSite* pSite); ~ScrollSiteCallback(); /* * IUnknown methods */ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj); STDMETHOD_(ULONG32,AddRef) (THIS); STDMETHOD_(ULONG32,Release) (THIS); /* * IHXCallback methods */ STDMETHOD(Func) (THIS);protected: LONG32 m_lRefCount; CHXBaseSite* m_pSite;};#endif /* _BASESITE_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -