kwin/effects/screenshot/screenshot.h
Martin Gräßlin 49fea7de58 New screenshot effect.
Saves an image of the active window into the home directory when triggered.
It uses an OpenGL FBO and by that can include the alpha channel and the decoration shadows.

svn path=/trunk/KDE/kdebase/workspace/; revision=1157682
2010-07-31 20:55:48 +00:00

49 lines
1.4 KiB
C++

/********************************************************************
KWin - the KDE window manager
This file is part of the KDE project.
Copyright (C) 2010 Martin Gräßlin <kde@martin-graesslin.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#ifndef KWIN_SCREENSHOT_H
#define KWIN_SCREENSHOT_H
#include <kwineffects.h>
#include <QObject>
namespace KWin
{
class ScreenShotEffect : public QObject, public Effect
{
Q_OBJECT
public:
ScreenShotEffect();
virtual ~ScreenShotEffect();
virtual void postPaintScreen();
static bool supported();
static void convertFromGLImage(QImage &img, int w, int h);
public Q_SLOTS:
void screenshot();
private:
EffectWindow *m_scheduledScreenshot;
};
} // namespace
#endif // KWIN_SCREENSHOT_H