Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / vcl / inc / unx / salobj.h
blobb3170cb6c0afe44833f512068c65680de0413242
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 int GetRectangleCount() {
43 return numClipRectangles; }
45 private:
47 XRectangle* ClipRectangleList;
48 int numClipRectangles;
49 int maxClipRectangles;
52 class VCLPLUG_GEN_PUBLIC X11SalObject : public SalObject
54 public:
55 SystemEnvData maSystemChildData;
56 SalFrame* mpParent;
57 ::Window maPrimary;
58 ::Window maSecondary;
59 Colormap maColormap;
60 SalClipRegion maClipRegion;
61 bool mbVisible;
63 static VCL_DLLPUBLIC bool Dispatch( XEvent* pEvent );
64 static VCL_DLLPUBLIC X11SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, bool bShow );
66 X11SalObject();
67 virtual ~X11SalObject() override;
69 // override all pure virtual methods
70 virtual void ResetClipRegion() override;
71 virtual void BeginSetClipRegion( sal_uIntPtr nRects ) override;
72 virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) override;
73 virtual void EndSetClipRegion() override;
75 virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ) override;
76 virtual void Show( bool bVisible ) override;
77 virtual void GrabFocus() override;
79 virtual void SetLeaveEnterBackgrounds(const css::uno::Sequence<css::uno::Any>& rLeaveArgs, const css::uno::Sequence<css::uno::Any>& rEnterArgs) override;
81 virtual const SystemEnvData* GetSystemData() const override;
84 #endif // INCLUDED_VCL_INC_UNX_SALOBJ_H
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */