~canonical-dx-team/unity/unity.fix-ql-losing-focus

« back to all changes in this revision

Viewing changes to src/WindowManager.h

  • Committer: Michael Terry
  • Date: 2010-12-17 14:07:11 UTC
  • mfrom: (724 unity)
  • mto: This revision was merged to the branch mainline in revision 743.
  • Revision ID: mike@mterry.name-20101217140711-qlij3bxdjuq1xoph
mergeĀ fromĀ upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2010 Canonical Ltd
 
3
 *
 
4
 * This program is free software: you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License version 3 as
 
6
 * published by the Free Software Foundation.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 *
 
16
 * Authored by: Neil Jagdish Patel <neil.patel@canonical.com>
 
17
 */
 
18
 
 
19
#ifndef WINDOW_MANAGER_H
 
20
#define WINDOW_MANAGER_H
 
21
 
 
22
#include <glib.h>
 
23
#include <sigc++/sigc++.h>
 
24
 
 
25
class WindowManager
 
26
{
 
27
  // This is a glue interface that breaks the dependancy of Unity with Compiz
 
28
  // Basically it has a default implementation that does nothing useful, but
 
29
  // the idea is that unity.cpp uses SetDefault() early enough in it's
 
30
  // initialization so the things that require it get a usable implementation
 
31
  //
 
32
  // Currently only the Panel uses it but hopefully we'll get more of
 
33
  // PluginAdaptor features moved into here and also get the Launcher to use
 
34
  // it.
 
35
 
 
36
public:
 
37
  static WindowManager * Default ();
 
38
  static void            SetDefault (WindowManager *manager);
 
39
 
 
40
  virtual bool IsWindowMaximized (guint32 xid) = 0;
 
41
  virtual bool IsWindowDecorated (guint32 xid) = 0;
 
42
 
 
43
  virtual void Restore (guint32 xid) = 0;
 
44
  virtual void Minimize (guint32 xid) = 0;
 
45
  virtual void Close (guint32 xid) = 0;
 
46
 
 
47
  virtual void Decorate   (guint32 xid);
 
48
  virtual void Undecorate (guint32 xid);
 
49
 
 
50
  // Signals
 
51
  sigc::signal<void, guint32> window_mapped;
 
52
  sigc::signal<void, guint32> window_unmapped;
 
53
  sigc::signal<void, guint32> window_maximized;
 
54
  sigc::signal<void, guint32> window_restored;
 
55
};
 
56
 
 
57
#endif // WINDOW_MANAGER_H