~3v1n0/unity/overlay-border-scale

« back to all changes in this revision

Viewing changes to plugins/unityshell/src/SwitcherController.h

  • Committer: Daniel van Vugt
  • Date: 2012-03-14 06:24:18 UTC
  • mfrom: (2108 unity)
  • mto: This revision was merged to the branch mainline in revision 2146.
  • Revision ID: daniel.van.vugt@canonical.com-20120314062418-nprucpbr0m7qky5e
MergedĀ latestĀ lp:unity

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
#include "SwitcherModel.h"
29
29
#include "SwitcherView.h"
 
30
#include "UBusWrapper.h"
30
31
 
31
32
#include <boost/shared_ptr.hpp>
32
33
#include <sigc++/sigc++.h>
62
63
public:
63
64
  typedef std::shared_ptr<Controller> Ptr;
64
65
 
65
 
  Controller();
 
66
  Controller(unsigned int load_timeout = 20);
66
67
  virtual ~Controller();
67
68
 
68
69
  nux::Property<int> timeout_length;
69
 
 
70
70
  nux::Property<bool> detail_on_timeout;
71
71
  nux::Property<int>  detail_timeout_length;
72
72
 
73
 
  void Show(ShowMode show, SortMode sort, bool reverse, std::vector<launcher::AbstractLauncherIcon*> results);
 
73
  void Show(ShowMode show, SortMode sort, bool reverse, std::vector<launcher::AbstractLauncherIcon::Ptr> results);
74
74
  void Hide(bool accept_state=true);
75
75
 
76
76
  bool Visible();
87
87
 
88
88
  void SelectFirstItem();
89
89
 
90
 
  void SetWorkspace(nux::Geometry geo);
 
90
  void SetWorkspace(nux::Geometry geo, int monitor);
91
91
 
92
92
  SwitcherView * GetView ();
93
93
 
98
98
  std::string GetName() const;
99
99
  void AddProperties(GVariantBuilder* builder);
100
100
 
 
101
  virtual void ConstructWindow();
 
102
  virtual void ConstructView();
 
103
  virtual void ShowView();
 
104
 
 
105
  unsigned int construct_timeout_;
 
106
 
101
107
private:
102
108
  enum DetailMode
103
109
  {
106
112
    TAB_NEXT_TILE,
107
113
  };
108
114
 
109
 
  void ConstructView();
110
 
 
111
 
  void OnModelSelectionChanged(launcher::AbstractLauncherIcon *icon);
112
 
 
113
 
  static void OnBackgroundUpdate(GVariant* data, Controller* self);
 
115
  void OnModelSelectionChanged(launcher::AbstractLauncherIcon::Ptr icon);
 
116
  void OnBackgroundUpdate(GVariant* data);
114
117
 
115
118
  SwitcherModel::Ptr model_;
116
119
  SwitcherView::Ptr view_;
117
120
 
 
121
  UBusManager ubus_manager_;
118
122
  nux::Geometry workarea_;
119
123
 
120
124
  nux::BaseWindow* view_window_;
121
125
  nux::HLayout* main_layout_;
122
126
 
 
127
  int monitor_;
123
128
  bool visible_;
124
129
  guint show_timer_;
125
130
  guint detail_timer_;
 
131
  guint lazy_timer_;
 
132
  guint view_idle_timer_;
126
133
  nux::Color bg_color_;
127
134
  DetailMode detail_mode_;
128
 
  guint bg_update_handle_;
129
135
 
130
 
  static gboolean OnShowTimer(gpointer data);
131
136
  static gboolean OnDetailTimer(gpointer data);
132
137
 
133
 
  static bool CompareSwitcherItemsPriority(launcher::AbstractLauncherIcon* first, launcher::AbstractLauncherIcon* second);
 
138
  static bool CompareSwitcherItemsPriority(launcher::AbstractLauncherIcon::Ptr first, launcher::AbstractLauncherIcon::Ptr second);
134
139
};
135
140
 
136
141
}