kwin Library API Documentation

sm.h

00001 /***************************************************************** 00002 KWin - the KDE window manager 00003 This file is part of the KDE project. 00004 00005 Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org> 00006 Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org> 00007 00008 You can Freely distribute this program under the GNU General Public 00009 License. See the file "COPYING" for the exact licensing terms. 00010 ******************************************************************/ 00011 00012 #ifndef KWIN_SM_H 00013 #define KWIN_SM_H 00014 00015 #include <X11/SM/SMlib.h> 00016 #include <kapplication.h> 00017 #include <netwm_def.h> 00018 00019 class QSocketNotifier; 00020 00021 namespace KWinInternal 00022 { 00023 00024 struct SessionInfo 00025 { 00026 QCString sessionId; 00027 QCString windowRole; 00028 QCString wmCommand; 00029 QCString wmClientMachine; 00030 QCString resourceName; 00031 QCString resourceClass; 00032 00033 QRect geometry; 00034 QRect restore; 00035 QRect fsrestore; 00036 int maximized; 00037 int fullscreen; 00038 int desktop; 00039 bool minimized; 00040 bool onAllDesktops; 00041 bool shaded; 00042 bool keepAbove; 00043 bool keepBelow; 00044 bool skipTaskbar; 00045 bool skipPager; 00046 bool userNoBorder; 00047 NET::WindowType windowType; 00048 bool active; // means 'was active in the saved session' 00049 }; 00050 00051 00052 enum SMSavePhase 00053 { 00054 SMSavePhase0, // saving global state in "phase 0" 00055 SMSavePhase2, // saving window state in phase 2 00056 SMSavePhase2Full // complete saving in phase2, there was no phase 0 00057 }; 00058 00059 class SessionSaveDoneHelper 00060 : public QObject 00061 { 00062 Q_OBJECT 00063 public: 00064 SessionSaveDoneHelper(); 00065 virtual ~SessionSaveDoneHelper(); 00066 SmcConn connection() const { return conn; } 00067 void saveDone(); 00068 void close(); 00069 private slots: 00070 void processData(); 00071 private: 00072 QSocketNotifier* notifier; 00073 SmcConn conn; 00074 }; 00075 00076 00077 class SessionManaged 00078 : public KSessionManaged 00079 { 00080 public: 00081 virtual bool saveState( QSessionManager& sm ); 00082 virtual bool commitData( QSessionManager& sm ); 00083 }; 00084 00085 } // namespace 00086 00087 #endif
KDE Logo
This file is part of the documentation for kwin Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Aug 13 21:47:06 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003