~om26er/ubuntu/oneiric/unity/sru-778256

« back to all changes in this revision

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

  • Committer: Didier Roche
  • Date: 2011-07-21 16:17:59 UTC
  • mfrom: (55.813.3 upstream)
  • Revision ID: didier.roche@canonical.com-20110721161759-osmh94x428t2bf2b
* New upstream release.
* debian/control:
  - build-dep on libnotify-dev
  - bump libnux-1.0-dev dep for ABI break

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#ifndef PANEL_TRAY_H
20
20
#define PANEL_TRAY_H
21
21
 
22
 
#include <Nux/View.h>
 
22
#include <Nux/Nux.h>
23
23
#include <gtk/gtk.h>
24
24
 
25
25
#include <gdk/gdkx.h>
26
26
 
27
 
#include <UnityCore/UnityCore.h>
28
 
 
29
27
#include "Introspectable.h"
30
28
#include "PanelIndicatorObjectView.h"
31
29
 
33
31
#include <unity-misc/na-tray-child.h>
34
32
#include <unity-misc/na-tray-manager.h>
35
33
 
36
 
namespace unity {
 
34
namespace unity
 
35
{
37
36
 
38
37
// NOTE: Why does this inherit from PanelIndicatorObjectView?
39
38
// It doesn't ever get any indicator object.
40
39
class PanelTray : public PanelIndicatorObjectView
41
40
{
42
41
public:
43
 
  PanelTray ();
44
 
  ~PanelTray ();
45
 
 
46
 
  void Draw (nux::GraphicsEngine& gfx_content, bool force_draw);
47
 
 
48
 
  void Sync ();
 
42
  PanelTray();
 
43
  ~PanelTray();
 
44
 
 
45
  void Draw(nux::GraphicsEngine& gfx_content, bool force_draw);
 
46
 
 
47
  void Sync();
49
48
 
50
49
  virtual void OnEntryAdded(unity::indicator::Entry::Ptr const& proxy);
51
50
 
52
51
public:
53
52
  guint8     _n_children;
54
 
  char     **_whitelist;
 
53
  char**     _whitelist;
55
54
protected:
56
 
  const gchar * GetName ();
57
 
  const gchar * GetChildsName ();
58
 
  void          AddProperties (GVariantBuilder *builder);
59
 
 
60
 
private:
61
 
  static gboolean FilterTrayCallback (NaTray *tray, NaTrayChild *child, PanelTray *self);
62
 
  static void     OnTrayIconRemoved  (NaTrayManager *manager, NaTrayChild *child, PanelTray *self);
63
 
  static gboolean IdleSync (PanelTray *tray);
64
 
  static gboolean OnTrayDraw (GtkWidget *widget, cairo_t *cr, PanelTray *tray);
65
 
 
66
 
private:
67
 
  GSettings *_settings;
68
 
  GtkWidget *_window;
69
 
  NaTray    *_tray;
 
55
  const gchar* GetName();
 
56
  const gchar* GetChildsName();
 
57
  void          AddProperties(GVariantBuilder* builder);
 
58
 
 
59
private:
 
60
  static gboolean FilterTrayCallback(NaTray* tray, NaTrayChild* child, PanelTray* self);
 
61
  static void     OnTrayIconRemoved(NaTrayManager* manager, NaTrayChild* child, PanelTray* self);
 
62
  static gboolean IdleSync(PanelTray* tray);
 
63
  static gboolean OnTrayDraw(GtkWidget* widget, cairo_t* cr, PanelTray* tray);
 
64
 
 
65
private:
 
66
  GSettings* _settings;
 
67
  GtkWidget* _window;
 
68
  NaTray*    _tray;
70
69
  int        _last_x;
71
70
  int        _last_y;
72
 
  
 
71
 
73
72
  gulong  _tray_expose_id;
74
73
  gulong  _tray_icon_added_id;
75
74
};