3
* Compiz session plugin
7
* Copyright (c) 2008 Travis Watkins <amaranth@ubuntu.com>
8
* Copyright (c) 2008 Danny Baumann <maniac@opencompositing.org>
9
* Copyright (c) 2006 Patrick Niklaus
12
* This program is free software; you can redistribute it and/or
13
* modify it under the terms of the GNU General Public License
14
* as published by the Free Software Foundation; either version 2
15
* of the License, or (at your option) any later version.
17
* This program is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
* GNU General Public License for more details.
22
* Authors: Travis Watkins <amaranth@ubuntu.com>
26
#include <core/core.h>
27
#include <core/pluginclasshandler.h>
29
#include <X11/Xatom.h>
30
#include <X11/SM/SM.h>
32
#include <libxml/xmlmemory.h>
33
#include <libxml/parser.h>
34
#include <libxml/xpath.h>
35
#include <libxml/xmlsave.h>
40
#include "session_options.h"
60
public ScreenInterface,
61
public PluginClassHandler<SessionScreen, CompScreen>,
65
SessionScreen (CompScreen *);
67
void handleEvent (XEvent *);
68
void sessionEvent (CompSession::Event, CompOption::Vector &);
70
bool readWindow (CompWindow *);
73
bool getUtf8Property (Window, Atom, CompString&);
74
bool getTextProperty (Window, Atom, CompString&);
75
bool getWindowTitle (Window, CompString&);
76
bool getWindowClass (Window, CompString&, CompString&);
77
bool getIsEmbedded (Window);
78
bool getClientLeaderProperty (CompWindow *, Atom, CompString&);
80
int getIntForProp (xmlNodePtr, const char *);
81
CompString getStringForProp (xmlNodePtr, const char *);
83
bool isSessionWindow (CompWindow *);
84
void addWindowNode (CompWindow *, xmlNodePtr);
86
void saveState (const CompString &);
87
void readState (xmlNodePtr);
88
void loadState (const CompString &);
90
bool matchWindowClass (CompWindow *, const SessionItem&);
92
CompString getFileName (const CompString &);
93
bool createDir (const CompString&);
101
typedef std::list<SessionItem> ItemList;
107
class SessionWindow :
108
public WindowInterface,
109
public PluginClassHandler<SessionWindow, CompWindow>
112
SessionWindow (CompWindow *);
114
bool place (CompPoint &);
121
class SessionPluginVTable :
122
public CompPlugin::VTableForScreenAndWindow<SessionScreen, SessionWindow>