1*24f6443dSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*24f6443dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*24f6443dSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*24f6443dSAndrew Rist * distributed with this work for additional information 6*24f6443dSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*24f6443dSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*24f6443dSAndrew Rist * "License"); you may not use this file except in compliance 9*24f6443dSAndrew Rist * with the License. You may obtain a copy of the License at 10*24f6443dSAndrew Rist * 11*24f6443dSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*24f6443dSAndrew Rist * 13*24f6443dSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*24f6443dSAndrew Rist * software distributed under the License is distributed on an 15*24f6443dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*24f6443dSAndrew Rist * KIND, either express or implied. See the License for the 17*24f6443dSAndrew Rist * specific language governing permissions and limitations 18*24f6443dSAndrew Rist * under the License. 19*24f6443dSAndrew Rist * 20*24f6443dSAndrew Rist *************************************************************/ 21*24f6443dSAndrew Rist 22*24f6443dSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _SV_SALOBJ_H 25cdf0e10cSrcweir #define _SV_SALOBJ_H 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <vcl/sv.h> 28cdf0e10cSrcweir #include <vcl/sysdata.hxx> 29cdf0e10cSrcweir 30cdf0e10cSrcweir #include <vclpluginapi.h> 31cdf0e10cSrcweir #include <salobj.hxx> 32cdf0e10cSrcweir 33cdf0e10cSrcweir class SalClipRegion 34cdf0e10cSrcweir { 35cdf0e10cSrcweir 36cdf0e10cSrcweir public: 37cdf0e10cSrcweir 38cdf0e10cSrcweir SalClipRegion(); 39cdf0e10cSrcweir ~SalClipRegion(); 40cdf0e10cSrcweir 41cdf0e10cSrcweir void BeginSetClipRegion( sal_uIntPtr nRects ); 42cdf0e10cSrcweir void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); 43cdf0e10cSrcweir EndSetClipRegion()44cdf0e10cSrcweir XRectangle *EndSetClipRegion() { 45cdf0e10cSrcweir return ClipRectangleList; } ResetClipRegion()46cdf0e10cSrcweir void ResetClipRegion() { 47cdf0e10cSrcweir numClipRectangles = 0; } GetClipRegionType()48cdf0e10cSrcweir sal_uInt16 GetClipRegionType() { 49cdf0e10cSrcweir return nClipRegionType; } SetClipRegionType(sal_uInt16 nType)50cdf0e10cSrcweir void SetClipRegionType( sal_uInt16 nType ) { 51cdf0e10cSrcweir nClipRegionType = nType; } GetRectangleCount()52cdf0e10cSrcweir int GetRectangleCount() { 53cdf0e10cSrcweir return numClipRectangles; } 54cdf0e10cSrcweir 55cdf0e10cSrcweir private: 56cdf0e10cSrcweir 57cdf0e10cSrcweir XRectangle* ClipRectangleList; 58cdf0e10cSrcweir int numClipRectangles; 59cdf0e10cSrcweir int maxClipRectangles; 60cdf0e10cSrcweir sal_uInt16 nClipRegionType; 61cdf0e10cSrcweir }; 62cdf0e10cSrcweir 63cdf0e10cSrcweir 64cdf0e10cSrcweir class VCLPLUG_GEN_PUBLIC X11SalObject : public SalObject 65cdf0e10cSrcweir { 66cdf0e10cSrcweir public: 67cdf0e10cSrcweir SystemChildData maSystemChildData; 68cdf0e10cSrcweir SalFrame* mpParent; 69cdf0e10cSrcweir XLIB_Window maPrimary; 70cdf0e10cSrcweir XLIB_Window maSecondary; 71cdf0e10cSrcweir Colormap maColormap; 72cdf0e10cSrcweir SalClipRegion maClipRegion; 73cdf0e10cSrcweir sal_Bool mbVisible; 74cdf0e10cSrcweir 75cdf0e10cSrcweir static VCL_DLLPUBLIC long Dispatch( XEvent* pEvent ); 76cdf0e10cSrcweir static VCL_DLLPUBLIC X11SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, sal_Bool bShow = sal_True ); 77cdf0e10cSrcweir 78cdf0e10cSrcweir X11SalObject(); 79cdf0e10cSrcweir virtual ~X11SalObject(); 80cdf0e10cSrcweir 81cdf0e10cSrcweir // overload all pure virtual methods 82cdf0e10cSrcweir virtual void ResetClipRegion(); 83cdf0e10cSrcweir virtual sal_uInt16 GetClipRegionType(); 84cdf0e10cSrcweir virtual void BeginSetClipRegion( sal_uIntPtr nRects ); 85cdf0e10cSrcweir virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); 86cdf0e10cSrcweir virtual void EndSetClipRegion(); 87cdf0e10cSrcweir 88cdf0e10cSrcweir virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ); 89cdf0e10cSrcweir virtual void Show( sal_Bool bVisible ); 90cdf0e10cSrcweir virtual void Enable( sal_Bool nEnable ); 91cdf0e10cSrcweir virtual void GrabFocus(); 92cdf0e10cSrcweir 93cdf0e10cSrcweir virtual void SetBackground(); 94cdf0e10cSrcweir virtual void SetBackground( SalColor nSalColor ); 95cdf0e10cSrcweir 96cdf0e10cSrcweir virtual const SystemEnvData* GetSystemData() const; 97cdf0e10cSrcweir 98cdf0e10cSrcweir virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept ); 99cdf0e10cSrcweir }; 100cdf0e10cSrcweir 101cdf0e10cSrcweir #endif // _SV_SALOBJ_H 102