summaryrefslogtreecommitdiff
path: root/src/extrawm.h
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@compiz-fusion.org>2009-03-16 02:54:07 +0100
committerDennis kasprzyk <onestone@compiz-fusion.org>2009-03-16 02:54:07 +0100
commit3bdd7192c4212413486278abf317791135d4ed9b (patch)
tree72096a82f8f92004eb26bf4751818441b7261cf9 /src/extrawm.h
parent5457f03ca5754541835f694db8f854b50684b523 (diff)
downloadextrawm-3bdd7192c4212413486278abf317791135d4ed9b.tar.gz
extrawm-3bdd7192c4212413486278abf317791135d4ed9b.tar.bz2
Track core changes.
Diffstat (limited to 'src/extrawm.h')
-rw-r--r--src/extrawm.h115
1 files changed, 115 insertions, 0 deletions
diff --git a/src/extrawm.h b/src/extrawm.h
new file mode 100644
index 0000000..6b4688e
--- /dev/null
+++ b/src/extrawm.h
@@ -0,0 +1,115 @@
+/*
+ * extrawm.h
+ * Compiz extra WM actions plugins
+ * Copyright: (C) 2007 Danny Baumann <maniac@beryl-project.org>
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include <X11/Xatom.h>
+
+#include <core/core.h>
+#include <core/pluginclasshandler.h>
+
+#include <composite/composite.h>
+
+#include "extrawm_options.h"
+
+class ExtraWMScreen :
+ public PluginClassHandler <ExtraWMScreen, CompScreen>,
+ public ExtrawmOptions,
+ public ScreenInterface
+{
+ public:
+
+ std::list <CompWindow *> attentionWindows;
+
+ ExtraWMScreen (CompScreen *);
+
+ void
+ handleEvent (XEvent *);
+
+ void
+ addAttentionWindow (CompWindow *w);
+
+ void
+ removeAttentionWindow (CompWindow *w);
+
+ void
+ updateAttentionWindow (CompWindow *w);
+
+ void
+ fullscreenWindow (CompWindow *w,
+ unsigned int state);
+
+ static bool
+ activateDemandsAttention (CompAction *action,
+ CompAction::State state,
+ CompOption::Vector &options);
+
+ static bool
+ activateWin (CompAction *action,
+ CompAction::State state,
+ CompOption::Vector &options);
+
+ static bool
+ toggleFullscreen (CompAction *action,
+ CompAction::State state,
+ CompOption::Vector &options);
+
+ static bool
+ toggleRedirect (CompAction *action,
+ CompAction::State state,
+ CompOption::Vector &options);
+
+ static bool
+ toggleAlwaysOnTop (CompAction *action,
+ CompAction::State state,
+ CompOption::Vector &options);
+
+ static bool
+ toggleSticky (CompAction *action,
+ CompAction::State state,
+ CompOption::Vector &options);
+};
+
+class ExtraWMWindow :
+ public PluginClassHandler <ExtraWMWindow, CompWindow>,
+ public WindowInterface
+{
+ public:
+
+ ExtraWMWindow (CompWindow *);
+
+ CompWindow *window;
+
+ void
+ stateChangeNotify (unsigned int);
+};
+
+#define EXTRAWM_SCREEN(s) \
+ ExtraWMScreen *es = ExtraWMScreen::get (s);
+
+#define EXTRAWM_WINDOW(w) \
+ ExtraWMWindow *ew = ExtraWMWindow::get (w);
+
+class ExtraWMPluginVTable :
+ public CompPlugin::VTableForScreenAndWindow <ExtraWMScreen, ExtraWMWindow>
+{
+ public:
+
+ bool init ();
+};