2
* winrules plugin for compiz
4
* Copyright (C) 2007 Bellegarde Cedric (gnumdk (at) gmail.com)
5
* Copyright (C) 2009 Sam Spilsbury (smspillaz@gmail.com)
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; either version 2
10
* of the License, or (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the
19
* Free Software Foundation, Inc.,
20
* 51 Franklin Street, Fifth Floor,
21
* Boston, MA 02110-1301, USA.
24
#include <core/core.h>
25
#include <core/pluginclasshandler.h>
26
#include <core/timer.h>
27
#include <core/atoms.h>
28
#include <X11/Xatom.h>
29
#include "winrules_options.h"
32
class WinrulesScreen :
33
public PluginClassHandler <WinrulesScreen, CompScreen>,
34
public WinrulesOptions,
35
public ScreenInterface
39
WinrulesScreen (CompScreen *screen);
42
handleEvent (XEvent *event);
45
matchExpHandlerChanged ();
48
matchPropertyChanged (CompWindow *w);
51
setProtocols (unsigned int protocols,
55
optionChanged (CompOption *option,
56
WinrulesOptions::Options num);
59
#define WINRULES_SCREEN(screen) \
60
WinrulesScreen *ws = WinrulesScreen::get(screen);
62
class WinrulesWindow :
63
public PluginClassHandler <WinrulesWindow, CompWindow>,
64
public WindowInterface
68
WinrulesWindow (CompWindow *window);
73
getAllowedActions (unsigned int &,
78
void setNoFocus (int optNum);
80
void setNoAlpha (int optNum);
83
updateState (int optNum,
87
setAllowedActions (int optNum,
91
matchSizeValue (CompOption::Value::Vector matches,
92
CompOption::Value::Vector widthValues,
93
CompOption::Value::Vector heightValues,
98
matchSize (int *width,
102
updateWindowSize (int width,
108
bool isFocussable ();
111
unsigned int allowedActions;
112
unsigned int stateSetMask;
113
unsigned int protocolSetMask;
116
#define WINRULES_WINDOW(window) \
117
WinrulesWindow *ww = WinrulesWindow::get(window);
119
class WinrulesPluginVTable:
120
public CompPlugin::VTableForScreenAndWindow <WinrulesScreen, WinrulesWindow>