Back to index

unity  6.0.0
networkarearegion.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2010 Canonical Ltd
00003  *
00004  * This program is free software: you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License version 3 as
00006  * published by the Free Software Foundation.
00007  *
00008  * This program is distributed in the hope that it will be useful,
00009  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011  * GNU General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU General Public License
00014  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00015  *
00016  * Authored by: Sam Spilsbury <sam.spilsbury@canonical.com>
00017  */
00018 
00019 #include <core/core.h>
00020 #include <core/pluginclasshandler.h>
00021 
00022 #include <core/atoms.h>
00023 #include <X11/Xatom.h>
00024 
00025 #include "networkarearegion_options.h"
00026 
00027 class UnityNETWorkareaRegionScreen :
00028   public PluginClassHandler <UnityNETWorkareaRegionScreen, CompScreen>,
00029   public ScreenInterface,
00030   public NetworkarearegionOptions
00031 {
00032 public:
00033   UnityNETWorkareaRegionScreen(CompScreen*);
00034   ~UnityNETWorkareaRegionScreen();
00035 
00036   void
00037   outputChangeNotify();
00038 
00039   void
00040   setProperty();
00041 
00042   void
00043   handleEvent(XEvent* event);
00044 
00045   void
00046   addSupportedAtoms(std::vector<Atom> &atoms);
00047 
00048 private:
00049 
00050   Atom mUnityNETWorkareaRegionAtom;
00051 };
00052 
00053 class UnityNETWorkareaRegionWindow :
00054   public PluginClassHandler <UnityNETWorkareaRegionWindow, CompWindow>,
00055   public WindowInterface
00056 {
00057 public:
00058 
00059   UnityNETWorkareaRegionWindow(CompWindow*);
00060   ~UnityNETWorkareaRegionWindow();
00061 
00062   CompWindow* window;
00063 
00064   void
00065   moveNotify(int dx, int dy, bool immediate);
00066 
00067   void
00068   resizeNotify(int dx, int dy, int dwidth, int dheight);
00069 };
00070 
00071 class UnityNETWorkareaRegionPluginVTable :
00072   public CompPlugin::VTableForScreenAndWindow <UnityNETWorkareaRegionScreen, UnityNETWorkareaRegionWindow>
00073 {
00074 public:
00075   bool init();
00076 };