LibreOffice Module vcl (master) 1
unx/salobj.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_VCL_INC_UNX_SALOBJ_H
21#define INCLUDED_VCL_INC_UNX_SALOBJ_H
22
23#include <X11/Xlib.h>
24
25#include <salobj.hxx>
26#include <vcl/sysdata.hxx>
27#include <vclpluginapi.h>
28#include <memory>
29
31{
32
33public:
34
37
38 void BeginSetClipRegion( sal_uInt32 nRects );
40
41 XRectangle *EndSetClipRegion() {
42 return ClipRectangleList.get(); }
45 int GetRectangleCount() const {
46 return numClipRectangles; }
47
48private:
49
50 std::unique_ptr<XRectangle[]>
54};
55
56class X11SalObject final : public SalObject
57{
60 ::Window maParentWin;
61 ::Window maPrimary;
62 ::Window maSecondary;
63 Colormap maColormap;
66
67public:
68 static VCL_DLLPUBLIC bool Dispatch( XEvent* pEvent );
69 static VCL_DLLPUBLIC X11SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, bool bShow );
70
72 virtual ~X11SalObject() override;
73
74 // override all pure virtual methods
75 virtual void ResetClipRegion() override;
76 virtual void BeginSetClipRegion( sal_uInt32 nRects ) override;
77 virtual void UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
78 virtual void EndSetClipRegion() override;
79
80 virtual void SetPosSize( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
81 virtual void Show( bool bVisible ) override;
82 virtual void GrabFocus() override;
83
84 virtual void SetLeaveEnterBackgrounds(const css::uno::Sequence<css::uno::Any>& rLeaveArgs, const css::uno::Sequence<css::uno::Any>& rEnterArgs) override;
85
86 virtual const SystemEnvData* GetSystemData() const override;
87};
88
89#endif // INCLUDED_VCL_INC_UNX_SALOBJ_H
90
91/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< XRectangle[]> ClipRectangleList
Definition: unx/salobj.h:51
void ResetClipRegion()
Definition: unx/salobj.h:43
void UnionClipRegion(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight)
void BeginSetClipRegion(sal_uInt32 nRects)
int numClipRectangles
Definition: unx/salobj.h:52
int GetRectangleCount() const
Definition: unx/salobj.h:45
XRectangle * EndSetClipRegion()
Definition: unx/salobj.h:41
int maxClipRectangles
Definition: unx/salobj.h:53
A SalFrame is a system window (e.g. an X11 window).
Definition: salframe.hxx:115
virtual void EndSetClipRegion() override
::Window maPrimary
Definition: unx/salobj.h:61
SalClipRegion maClipRegion
Definition: unx/salobj.h:64
SystemEnvData maSystemChildData
Definition: unx/salobj.h:58
virtual void GrabFocus() override
static VCL_DLLPUBLIC X11SalObject * CreateObject(SalFrame *pParent, SystemWindowData *pWindowData, bool bShow)
virtual ~X11SalObject() override
::Window maParentWin
Definition: unx/salobj.h:60
virtual void SetLeaveEnterBackgrounds(const css::uno::Sequence< css::uno::Any > &rLeaveArgs, const css::uno::Sequence< css::uno::Any > &rEnterArgs) override
::Window maSecondary
Definition: unx/salobj.h:62
virtual const SystemEnvData * GetSystemData() const override
static VCL_DLLPUBLIC bool Dispatch(XEvent *pEvent)
virtual void SetPosSize(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override
virtual void Show(bool bVisible) override
Colormap maColormap
Definition: unx/salobj.h:63
virtual void BeginSetClipRegion(sal_uInt32 nRects) override
SalFrame * mpParent
Definition: unx/salobj.h:59
bool mbVisible
Definition: unx/salobj.h:65
virtual void ResetClipRegion() override
virtual void UnionClipRegion(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
long Long