kwin
sm.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
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 TQSocketNotifier;
00020
00021 namespace KWinInternal
00022 {
00023
00024 struct SessionInfo
00025 {
00026 TQCString sessionId;
00027 TQCString windowRole;
00028 TQCString wmCommand;
00029 TQCString wmClientMachine;
00030 TQCString resourceName;
00031 TQCString resourceClass;
00032
00033 TQRect geometry;
00034 TQRect restore;
00035 TQRect fsrestore;
00036 int maximized;
00037 int fullscreen;
00038 int desktop;
00039 bool minimized;
00040 bool onAllDesktops;
00041 bool shaded;
00042 bool shadowed;
00043 bool keepAbove;
00044 bool keepBelow;
00045 bool skipTaskbar;
00046 bool skipPager;
00047 bool userNoBorder;
00048 NET::WindowType windowType;
00049 TQString shortcut;
00050 bool active;
00051 };
00052
00053
00054 enum SMSavePhase
00055 {
00056 SMSavePhase0,
00057 SMSavePhase2,
00058 SMSavePhase2Full
00059 };
00060
00061 class SessionSaveDoneHelper
00062 : public QObject
00063 {
00064 Q_OBJECT
00065 public:
00066 SessionSaveDoneHelper();
00067 virtual ~SessionSaveDoneHelper();
00068 SmcConn connection() const { return conn; }
00069 void saveDone();
00070 void close();
00071 private slots:
00072 void processData();
00073 private:
00074 TQSocketNotifier* notifier;
00075 SmcConn conn;
00076 };
00077
00078
00079 class SessionManaged
00080 : public KSessionManaged
00081 {
00082 public:
00083 virtual bool saveState( TQSessionManager& sm );
00084 virtual bool commitData( TQSessionManager& sm );
00085 };
00086
00087 }
00088
00089 #endif