~smspillaz/unity/untiy.less-paint-insanity

« back to all changes in this revision

Viewing changes to plugins/unityshell/src/LauncherHideMachine.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:
24
24
#include <glib.h>
25
25
#include <string>
26
26
 
 
27
#include "Decaymulator.h"
 
28
 
27
29
class LauncherHideMachine : public sigc::trackable
28
30
{
29
31
public:
44
46
    EXTERNAL_DND_ACTIVE    = 1 << 5,
45
47
    INTERNAL_DND_ACTIVE    = 1 << 6,
46
48
    TRIGGER_BUTTON_SHOW    = 1 << 7,
47
 
    ANY_WINDOW_UNDER       = 1 << 8,
48
 
    ACTIVE_WINDOW_UNDER    = 1 << 9,
49
49
    DND_PUSHED_OFF         = 1 << 10,
50
50
    MOUSE_MOVE_POST_REVEAL = 1 << 11,
51
51
    VERTICAL_SLIDE_ACTIVE  = 1 << 12,
55
55
    SCALE_ACTIVE           = 1 << 16,
56
56
    EXPO_ACTIVE            = 1 << 17,
57
57
    MT_DRAG_OUT            = 1 << 18,
58
 
    MOUSE_OVER_ACTIVE_EDGE = 1 << 19,
 
58
    REVEAL_PRESSURE_PASS   = 1 << 19,
59
59
    LAUNCHER_PULSE         = 1 << 20,
60
60
    LOCK_HIDE              = 1 << 21
61
61
  } HideQuirk;
62
62
 
 
63
  nux::Property<int> reveal_pressure;
 
64
  nux::Property<int> edge_decay_rate;
 
65
 
 
66
  nux::Property<float> reveal_progress;
 
67
 
63
68
  LauncherHideMachine();
64
69
  virtual ~LauncherHideMachine();
65
70
 
66
71
  void     SetMode(HideMode mode);
67
 
  HideMode GetMode();
 
72
  HideMode GetMode() const;
68
73
 
69
 
  void     SetShowOnEdge(bool value);
70
 
  bool     GetShowOnEdge();
 
74
  void AddRevealPressure(int pressure);
71
75
 
72
76
  void SetQuirk(HideQuirk quirk, bool active);
73
 
  bool GetQuirk(HideQuirk quirk, bool allow_partial = true);
 
77
  bool GetQuirk(HideQuirk quirk, bool allow_partial = true) const;
74
78
 
75
 
  bool ShouldHide();
 
79
  bool ShouldHide() const;
76
80
 
77
81
  sigc::signal<void, bool> should_hide_changed;
78
82
 
79
 
  std::string DebugHideQuirks();
 
83
  std::string DebugHideQuirks() const;
80
84
 
81
85
private:
82
86
  void EnsureHideState(bool skip_delay);
85
89
  static gboolean OnHideDelayTimeout(gpointer data);
86
90
  static gboolean EmitShouldHideChanged(gpointer data);
87
91
 
 
92
  void OnDecayRateChanged (int value);
 
93
 
 
94
  unity::ui::Decaymulator::Ptr decaymulator_;
 
95
 
88
96
  bool      _should_hide;
89
97
  bool      _latest_emit_should_hide;
90
 
  bool      _show_on_edge;
91
98
  HideQuirk _quirks;
92
99
  HideMode  _mode;
93
100
  unsigned int _hide_delay_timeout_length;