Branch libreoffice-5-0-4
[LibreOffice.git] / vcl / inc / unx / salobj.h
blob4fc5a0867b7afec365adec14b47a80112d77feb6
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_VCL_INC_UNX_SALOBJ_H
21 #define INCLUDED_VCL_INC_UNX_SALOBJ_H
23 #include <salobj.hxx>
24 #include <vcl/sysdata.hxx>
25 #include <vclpluginapi.h>
27 class SalClipRegion
30 public:
32 SalClipRegion();
33 ~SalClipRegion();
35 void BeginSetClipRegion( sal_uIntPtr nRects );
36 void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
38 XRectangle *EndSetClipRegion() {
39 return ClipRectangleList; }
40 void ResetClipRegion() {
41 numClipRectangles = 0; }
42 sal_uInt16 GetClipRegionType() {
43 return nClipRegionType; }
44 void SetClipRegionType( sal_uInt16 nType ) {
45 nClipRegionType = nType; }
46 int GetRectangleCount() {
47 return numClipRectangles; }
49 private:
51 XRectangle* ClipRectangleList;
52 int numClipRectangles;
53 int maxClipRectangles;
54 sal_uInt16 nClipRegionType;
57 class VCLPLUG_GEN_PUBLIC X11SalObject : public SalObject
59 public:
60 SystemEnvData maSystemChildData;
61 SalFrame* mpParent;
62 ::Window maPrimary;
63 ::Window maSecondary;
64 Colormap maColormap;
65 SalClipRegion maClipRegion;
66 bool mbVisible;
68 static VCL_DLLPUBLIC bool Dispatch( XEvent* pEvent );
69 static VCL_DLLPUBLIC X11SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, bool bShow = true );
71 X11SalObject();
72 virtual ~X11SalObject();
74 // override all pure virtual methods
75 virtual void ResetClipRegion() SAL_OVERRIDE;
76 virtual sal_uInt16 GetClipRegionType() SAL_OVERRIDE;
77 virtual void BeginSetClipRegion( sal_uIntPtr nRects ) SAL_OVERRIDE;
78 virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) SAL_OVERRIDE;
79 virtual void EndSetClipRegion() SAL_OVERRIDE;
81 virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ) SAL_OVERRIDE;
82 virtual void Show( bool bVisible ) SAL_OVERRIDE;
83 virtual void GrabFocus() SAL_OVERRIDE;
85 virtual const SystemEnvData* GetSystemData() const SAL_OVERRIDE;
88 #endif // INCLUDED_VCL_INC_UNX_SALOBJ_H
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */