Back to index

unity  6.0.0
DBusIndicators.h
Go to the documentation of this file.
00001 // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
00002 /*
00003  * Copyright (C) 2010 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: Neil Jagdish Patel <neil.patel@canonical.com>
00018  */
00019 
00020 #ifndef UNITY_DBUSINDICATORS_H
00021 #define UNITY_DBUSINDICATORS_H
00022 
00023 #include "Indicators.h"
00024 
00025 
00026 namespace unity
00027 {
00028 namespace indicator
00029 {
00030 
00031 // Connects to the remote panel service (unity-panel-service) and translates
00032 // that into something that the panel can show
00033 class DBusIndicators : public Indicators
00034 {
00035 public:
00036   typedef std::shared_ptr<DBusIndicators> Ptr;
00037 
00038   DBusIndicators();
00039   ~DBusIndicators();
00040 
00041   void SyncGeometries(std::string const& name,
00042                       EntryLocationMap const& locations);
00043 
00044   virtual void OnEntryScroll(std::string const& entry_id, int delta);
00045   virtual void OnEntryShowMenu(std::string const& entry_id, unsigned int xid,
00046                                int x, int y, unsigned int button,
00047                                unsigned int timestamp);
00048   virtual void OnEntrySecondaryActivate(std::string const& entry_id,
00049                                         unsigned int timestamp);
00050   virtual void OnShowAppMenu(unsigned int xid, int x, int y,
00051                              unsigned int timestamp);
00052 
00053 private:
00054   class Impl;
00055   std::unique_ptr<Impl> pimpl;
00056 };
00057 
00058 }
00059 }
00060 
00061 #endif