Back to index

unity  6.0.0
EdgeBarrierController.h
Go to the documentation of this file.
00001 // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
00002 /*
00003  * Copyright (C) 2012 Canonical Ltd
00004  *
00005  * This program is free software: you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License version 3 as
00007  * published by the Free Software Foundation.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016  *
00017  * Authored by: Jason Smith <jason.smith@canonical.com>
00018  */
00019 
00020 #ifndef UNITY_EDGEBARRIERCONTROLLER_H
00021 #define UNITY_EDGEBARRIERCONTROLLER_H
00022 
00023 #include "PointerBarrier.h"
00024 #include "LauncherOptions.h"
00025 
00026 namespace unity {
00027 namespace ui {
00028 
00029 class EdgeBarrierSubscriber
00030 {
00031 public:
00032   virtual bool HandleBarrierEvent(PointerBarrierWrapper* owner, BarrierEvent::Ptr event) { return false; };
00033 };
00034 
00035 class EdgeBarrierController : public sigc::trackable
00036 {
00037 public:
00038   typedef std::shared_ptr<EdgeBarrierController> Ptr;
00039 
00040   EdgeBarrierController();
00041   ~EdgeBarrierController();
00042 
00043   nux::Property<bool> sticky_edges;
00044   nux::Property<launcher::Options::Ptr> options;
00045 
00046   void Subscribe(EdgeBarrierSubscriber* subscriber, int monitor);
00047   void Unsubscribe(EdgeBarrierSubscriber* subscriber, int monitor);
00048 
00049 private:
00050   struct Impl;
00051   Impl* pimpl;
00052 };
00053 
00054 }
00055 }
00056 
00057 #endif