1*ebfcd9afSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*ebfcd9afSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*ebfcd9afSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*ebfcd9afSAndrew Rist * distributed with this work for additional information 6*ebfcd9afSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*ebfcd9afSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*ebfcd9afSAndrew Rist * "License"); you may not use this file except in compliance 9*ebfcd9afSAndrew Rist * with the License. You may obtain a copy of the License at 10*ebfcd9afSAndrew Rist * 11*ebfcd9afSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*ebfcd9afSAndrew Rist * 13*ebfcd9afSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*ebfcd9afSAndrew Rist * software distributed under the License is distributed on an 15*ebfcd9afSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*ebfcd9afSAndrew Rist * KIND, either express or implied. See the License for the 17*ebfcd9afSAndrew Rist * specific language governing permissions and limitations 18*ebfcd9afSAndrew Rist * under the License. 19*ebfcd9afSAndrew Rist * 20*ebfcd9afSAndrew Rist *************************************************************/ 21*ebfcd9afSAndrew Rist 22*ebfcd9afSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _SV_SALOBJ_HXX 25cdf0e10cSrcweir #define _SV_SALOBJ_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <vcl/sv.h> 28cdf0e10cSrcweir #include <vcl/dllapi.h> 29cdf0e10cSrcweir #include <vcl/salgtype.hxx> 30cdf0e10cSrcweir #include <salwtype.hxx> 31cdf0e10cSrcweir 32cdf0e10cSrcweir struct SystemEnvData; 33cdf0e10cSrcweir 34cdf0e10cSrcweir // ------------------- 35cdf0e10cSrcweir // - SalObject-Types - 36cdf0e10cSrcweir // ------------------- 37cdf0e10cSrcweir 38cdf0e10cSrcweir #define SAL_OBJECT_CLIP_INCLUDERECTS ((sal_uInt16)0x0001) 39cdf0e10cSrcweir #define SAL_OBJECT_CLIP_EXCLUDERECTS ((sal_uInt16)0x0002) 40cdf0e10cSrcweir #define SAL_OBJECT_CLIP_ABSOLUTE ((sal_uInt16)0x0004) 41cdf0e10cSrcweir 42cdf0e10cSrcweir // ------------- 43cdf0e10cSrcweir // - SalObject - 44cdf0e10cSrcweir // ------------- 45cdf0e10cSrcweir 46cdf0e10cSrcweir class VCL_PLUGIN_PUBLIC SalObject 47cdf0e10cSrcweir { 48cdf0e10cSrcweir void* m_pInst; 49cdf0e10cSrcweir SALOBJECTPROC m_pCallback; 50cdf0e10cSrcweir sal_Bool m_bMouseTransparent:1, 51cdf0e10cSrcweir m_bEraseBackground:1; 52cdf0e10cSrcweir public: SalObject()53cdf0e10cSrcweir SalObject() : m_pInst( NULL ), m_pCallback( NULL ), m_bMouseTransparent( sal_False ), m_bEraseBackground( sal_True ) {} 54cdf0e10cSrcweir virtual ~SalObject(); 55cdf0e10cSrcweir 56cdf0e10cSrcweir virtual void ResetClipRegion() = 0; 57cdf0e10cSrcweir virtual sal_uInt16 GetClipRegionType() = 0; 58cdf0e10cSrcweir virtual void BeginSetClipRegion( sal_uLong nRects ) = 0; 59cdf0e10cSrcweir virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0; 60cdf0e10cSrcweir virtual void EndSetClipRegion() = 0; 61cdf0e10cSrcweir 62cdf0e10cSrcweir virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ) = 0; 63cdf0e10cSrcweir virtual void Show( sal_Bool bVisible ) = 0; 64cdf0e10cSrcweir virtual void Enable( sal_Bool nEnable ) = 0; 65cdf0e10cSrcweir virtual void GrabFocus() = 0; 66cdf0e10cSrcweir 67cdf0e10cSrcweir virtual void SetBackground() = 0; 68cdf0e10cSrcweir virtual void SetBackground( SalColor nSalColor ) = 0; 69cdf0e10cSrcweir 70cdf0e10cSrcweir virtual const SystemEnvData* GetSystemData() const = 0; 71cdf0e10cSrcweir 72cdf0e10cSrcweir virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept ) = 0; 73cdf0e10cSrcweir SetCallback(void * pInst,SALOBJECTPROC pProc)74cdf0e10cSrcweir void SetCallback( void* pInst, SALOBJECTPROC pProc ) 75cdf0e10cSrcweir { m_pInst = pInst; m_pCallback = pProc; } CallCallback(sal_uInt16 nEvent,const void * pEvent)76cdf0e10cSrcweir long CallCallback( sal_uInt16 nEvent, const void* pEvent ) 77cdf0e10cSrcweir { return m_pCallback ? m_pCallback( m_pInst, this, nEvent, pEvent ) : 0; } SetMouseTransparent(sal_Bool bMouseTransparent)78cdf0e10cSrcweir void SetMouseTransparent( sal_Bool bMouseTransparent ) 79cdf0e10cSrcweir { m_bMouseTransparent = bMouseTransparent; } IsMouseTransparent()80cdf0e10cSrcweir sal_Bool IsMouseTransparent() 81cdf0e10cSrcweir { return m_bMouseTransparent; } EnableEraseBackground(sal_Bool bEnable)82cdf0e10cSrcweir void EnableEraseBackground( sal_Bool bEnable ) 83cdf0e10cSrcweir { m_bEraseBackground = bEnable; } IsEraseBackgroundEnabled()84cdf0e10cSrcweir sal_Bool IsEraseBackgroundEnabled() 85cdf0e10cSrcweir { return m_bEraseBackground; } 86cdf0e10cSrcweir }; 87cdf0e10cSrcweir 88cdf0e10cSrcweir #endif // _SV_SALOBJ_HXX 89