File indexing completed on 2024-05-19 09:43:13
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 _QTCURVE_DBUS_H_ 0024 #define _QTCURVE_DBUS_H_ 0025 0026 #include <QDBusAbstractAdaptor> 0027 #include "qtcurvehandler.h" 0028 0029 namespace QtCurve { 0030 namespace KWin { 0031 0032 class QtCurveDBus : public QDBusAbstractAdaptor 0033 { 0034 Q_OBJECT 0035 Q_CLASSINFO("D-Bus Interface", "org.kde.QtCurve") 0036 0037 public: 0038 0039 QtCurveDBus(QtCurveHandler *handler) : QDBusAbstractAdaptor(handler) { } 0040 0041 void emitBorderSizes() { emit borderSizesChanged(); } 0042 void emitMbToggle(unsigned int xid) { emit toggleMenuBar(xid); } 0043 void emitSbToggle(unsigned int xid) { emit toggleStatusBar(xid); } 0044 0045 Q_SIGNALS: 0046 0047 void borderSizesChanged(); 0048 void toggleMenuBar(unsigned int xid); 0049 void toggleStatusBar(unsigned int xid); 0050 0051 public Q_SLOTS: 0052 0053 Q_NOREPLY void menuBarSize(unsigned int xid, int size) { Handler()->menuBarSize(xid, size); } 0054 Q_NOREPLY void statusBarState(unsigned int xid, bool state) { Handler()->statusBarState(xid, state); } 0055 }; 0056 0057 } 0058 } 0059 0060 #endif