bump product version to 6.4.0.3
[LibreOffice.git] / vcl / inc / unx / saldata.hxx
blob14cf634732152978f71012d6867aa5ff7b8973f5
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_SALDATA_HXX
21 #define INCLUDED_VCL_INC_UNX_SALDATA_HXX
23 #include <X11/Xlib.h>
25 #include <unx/saldisp.hxx>
26 #include <unx/gendata.hxx>
27 #include <vclpluginapi.h>
29 class SalXLib;
30 class SalDisplay;
31 class SalPrinter;
33 class VCLPLUG_GEN_PUBLIC X11SalData : public GenericUnixSalData
35 struct XErrorStackEntry
37 bool m_bIgnore;
38 bool m_bWas;
39 XErrorHandler m_aHandler;
41 std::vector< XErrorStackEntry > m_aXErrorHandlerStack;
42 XIOErrorHandler m_aOrigXIOErrorHandler;
44 protected:
45 std::unique_ptr<SalXLib> pXLib_;
47 public:
48 X11SalData( GenericUnixSalDataType t, SalInstance *pInstance );
49 virtual ~X11SalData() override;
51 virtual void Init();
52 virtual void Dispose() override;
54 void DeleteDisplay(); // for shutdown
56 SalXLib* GetLib() const { return pXLib_.get(); }
58 static void Timeout();
60 // X errors
61 virtual void ErrorTrapPush() override;
62 virtual bool ErrorTrapPop( bool bIgnoreError = true ) override;
63 void XError( Display *pDisp, XErrorEvent *pEvent );
64 bool HasXErrorOccurred() const
65 { return m_aXErrorHandlerStack.back().m_bWas; }
66 void ResetXErrorOccurred()
67 { m_aXErrorHandlerStack.back().m_bWas = false; }
68 void PushXErrorLevel( bool bIgnore );
69 void PopXErrorLevel();
72 X11SalData* GetX11SalData();
74 #endif // INCLUDED_VCL_INC_UNX_SALDATA_HXX
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */