diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 4aed2c8219774f5d797760606b8489a92ddc5163 (patch) | |
tree | 3f8c130f7d269626bf6a9447407ef6c35954426a /kdesktop/lock/lockprocess.h | |
download | tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdesktop/lock/lockprocess.h')
-rw-r--r-- | kdesktop/lock/lockprocess.h | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/kdesktop/lock/lockprocess.h b/kdesktop/lock/lockprocess.h new file mode 100644 index 000000000..d7043e64d --- /dev/null +++ b/kdesktop/lock/lockprocess.h @@ -0,0 +1,131 @@ +//=========================================================================== +// +// This file is part of the KDE project +// +// Copyright (c) 1999 Martin R. Jones <mjones@kde.org> +// Copyright (c) 2003 Oswald Buddenhagen <ossi@kde.org> +// + +#ifndef __LOCKENG_H__ +#define __LOCKENG_H__ + +#include <kgreeterplugin.h> + +#include <kprocess.h> +#include <kpixmap.h> + +#include <qwidget.h> +#include <qtimer.h> +#include <qvaluestack.h> +#include <qmessagebox.h> +#include <qpixmap.h> + +#include <X11/Xlib.h> + +class KLibrary; + +struct GreeterPluginHandle { + KLibrary *library; + kgreeterplugin_info *info; +}; + +//=========================================================================== +// +// Screen saver handling process. Handles screensaver window, +// starting screensaver hacks, and password entry. +// +class LockProcess + : public QWidget +{ + Q_OBJECT +public: + LockProcess(bool child_saver = false, bool useBlankOnly = false); + ~LockProcess(); + + bool lock(); + + bool defaultSave(); + + bool dontLock(); + + void setChildren(QValueList<int> children) { child_sockets = children; } + void setParent(int fd) { mParent = fd; } + + void msgBox( QMessageBox::Icon type, const QString &txt ); + int execDialog( QDialog* dlg ); + +public slots: + void quitSaver(); + void preparePopup(); + void cleanupPopup(); + +protected: + virtual bool x11Event(XEvent *); + virtual void timerEvent(QTimerEvent *); + +private slots: + void hackExited(KProcess *); + void signalPipeSignal(); + bool startLock(); + void suspend(); + void checkDPMSActive(); + void slotDeadTimePassed(); + +private: + void configure(); + void readSaver(); + void createSaverWindow(); + void hideSaverWindow(); + void saveVRoot(); + void setVRoot(Window win, Window rw); + void removeVRoot(Window win); + bool grabKeyboard(); + bool grabMouse(); + bool grabInput(); + void ungrabInput(); + void cantLock(const QString &reason); + bool startSaver(); + void stopSaver(); + bool startHack(); + void stopHack(); + void setupSignals(); + bool checkPass(); + void stayOnTop(); + void lockXF86(); + void unlockXF86(); + void resume( bool force ); + static QVariant getConf(void *ctx, const char *key, const QVariant &dflt); + + bool mLocked; + int mLockGrace; + int mPriority; + bool mBusy; + KProcess mHackProc; + int mRootWidth; + int mRootHeight; + QString mSaverExec; + QString mSaver; + bool mOpenGLVisual; + bool child_saver; + QValueList<int> child_sockets; + int mParent; + bool mUseBlankOnly; + bool mSuspended; + QTimer mSuspendTimer; + bool mVisibility; + bool mDPMSDepend; + QTimer mCheckDPMS; + QValueStack< QWidget* > mDialogs; + bool mRestoreXF86Lock; + bool mForbidden; + QStringList mPlugins, mPluginOptions; + QString mMethod; + GreeterPluginHandle greetPlugin; + QPixmap mSavedScreen; + int mAutoLogoutTimerId; + int mAutoLogoutTimeout; + bool mAutoLogout; +}; + +#endif + |