loplugin:constmethod in vcl
[LibreOffice.git] / vcl / inc / unx / salobj.h
blobbef98cbbdf6e76d62c9cdbaf05f084d9dd0d2168
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>
26 #include <memory>
28 class SalClipRegion
31 public:
33 SalClipRegion();
34 ~SalClipRegion();
36 void BeginSetClipRegion( sal_uInt32 nRects );
37 void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
39 XRectangle *EndSetClipRegion() {
40 return ClipRectangleList.get(); }
41 void ResetClipRegion() {
42 numClipRectangles = 0; }
43 int GetRectangleCount() const {
44 return numClipRectangles; }
46 private:
48 std::unique_ptr<XRectangle[]>
49 ClipRectangleList;
50 int numClipRectangles;
51 int maxClipRectangles;
54 class VCLPLUG_GEN_PUBLIC X11SalObject : public SalObject
56 public:
57 SystemEnvData maSystemChildData;
58 SalFrame* mpParent;
59 ::Window maParentWin;
60 ::Window maPrimary;
61 ::Window maSecondary;
62 Colormap maColormap;
63 SalClipRegion maClipRegion;
64 bool mbVisible;
66 static VCL_DLLPUBLIC bool Dispatch( XEvent* pEvent );
67 static VCL_DLLPUBLIC X11SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, bool bShow );
69 X11SalObject();
70 virtual ~X11SalObject() override;
72 // override all pure virtual methods
73 virtual void ResetClipRegion() override;
74 virtual void BeginSetClipRegion( sal_uInt32 nRects ) override;
75 virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) override;
76 virtual void EndSetClipRegion() override;
78 virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ) override;
79 virtual void Show( bool bVisible ) override;
80 virtual void GrabFocus() override;
82 virtual void SetLeaveEnterBackgrounds(const css::uno::Sequence<css::uno::Any>& rLeaveArgs, const css::uno::Sequence<css::uno::Any>& rEnterArgs) override;
84 virtual const SystemEnvData* GetSystemData() const override;
87 #endif // INCLUDED_VCL_INC_UNX_SALOBJ_H
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */