Warning, file /system/qtcurve/qt4/style/shadowhelper.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /***************************************************************************** 0002 * Copyright 2010 Craig Drummond <craig.p.drummond@gmail.com> * 0003 * Copyright 2013 - 2015 Yichao Yu <yyc1992@gmail.com> * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify * 0006 * it under the terms of the GNU Lesser General Public License as * 0007 * published by the Free Software Foundation; either version 2.1 of the * 0008 * License, or (at your option) version 3, or any later version accepted * 0009 * by the membership of KDE e.V. (or its successor approved by the * 0010 * membership of KDE e.V.), which shall act as a proxy defined in * 0011 * Section 6 of version 3 of the license. * 0012 * * 0013 * This program is distributed in the hope that it will be useful, * 0014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 0016 * Lesser General Public License for more details. * 0017 * * 0018 * You should have received a copy of the GNU Lesser General Public * 0019 * License along with this library. If not, * 0020 * see <http://www.gnu.org/licenses/>. * 0021 *****************************************************************************/ 0022 0023 #ifndef shadowhelper_h 0024 #define shadowhelper_h 0025 0026 ////////////////////////////////////////////////////////////////////////////// 0027 // shadowhelper.h 0028 // handle shadow pixmaps passed to window manager via X property 0029 // ------------------- 0030 // 0031 // Copyright (c) 2010 Hugo Pereira Da Costa <hugo@oxygen-icons.org> 0032 // 0033 // Permission is hereby granted, free of charge, to any person obtaining a copy 0034 // of this software and associated documentation files (the "Software"), to 0035 // deal in the Software without restriction, including without limitation the 0036 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 0037 // sell copies of the Software, and to permit persons to whom the Software is 0038 // furnished to do so, subject to the following conditions: 0039 // 0040 // The above copyright notice and this permission notice shall be included in 0041 // all copies or substantial portions of the Software. 0042 // 0043 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 0044 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 0045 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 0046 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 0047 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 0048 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 0049 // IN THE SOFTWARE. 0050 ////////////////////////////////////////////////////////////////////////////// 0051 0052 #include <QObject> 0053 0054 namespace QtCurve { 0055 //! handle shadow pixmaps passed to window manager via X property 0056 class ShadowHelper: public QObject { 0057 Q_OBJECT 0058 public: 0059 //!@name property names 0060 static const char *const netWMForceShadowPropertyName; 0061 static const char *const netWMSkipShadowPropertyName; 0062 //! constructor 0063 ShadowHelper(QObject *parent): QObject(parent) 0064 { 0065 } 0066 0067 //! register widget 0068 bool registerWidget(QWidget*, bool force=false); 0069 0070 //! unregister widget 0071 void unregisterWidget(QWidget*); 0072 0073 //! event filter 0074 bool eventFilter(QObject*, QEvent*) override; 0075 0076 protected: 0077 //! accept widget 0078 bool acceptWidget(QWidget*) const; 0079 0080 //! install shadow X11 property on given widget 0081 bool installX11Shadows(QWidget*); 0082 0083 //! uninstall shadow X11 property on given widget 0084 void uninstallX11Shadows(QWidget*) const; 0085 }; 0086 } 0087 0088 #endif