~azzar1/unity/scale-left-padding

« back to all changes in this revision

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

  • Committer: Andrea Azzarone
  • Date: 2011-12-19 22:18:53 UTC
  • mfrom: (1792 unity)
  • mto: This revision was merged to the branch mainline in revision 1833.
  • Revision ID: azzaronea@gmail.com-20111219221853-wyy8fqwxk78s85ct
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
2
2
/*
3
 
 * Copyright (C) 2010 Canonical Ltd
 
3
 * Copyright (C) 2010-2011 Canonical Ltd
4
4
 *
5
5
 * This program is free software: you can redistribute it and/or modify
6
6
 * it under the terms of the GNU General Public License version 3 as
23
23
#ifndef PANEL_TITLEBAR_GRAB_AREA_H
24
24
#define PANEL_TITLEBAR_GRAB_AREA_H_H
25
25
 
26
 
 
27
 
// TODO: remove once double click will work in nux
28
 
#include <time.h>
29
 
 
30
26
#include <Nux/View.h>
31
27
 
32
28
#include "Introspectable.h"
33
29
 
34
30
class PanelTitlebarGrabArea : public nux::InputArea, public unity::debug::Introspectable
35
31
{
36
 
  // This acts a bit like a titlebar, it can be grabbed (such that we can pull
37
 
  // the window down)
 
32
  /* This acts a bit like a titlebar, it can be grabbed (such that we can pull
 
33
   * the window down)                                                         */
38
34
 
39
35
public:
40
36
  PanelTitlebarGrabArea();
44
40
  bool IsGrabbed();
45
41
 
46
42
private:
47
 
  void RecvMouseDown(int x, int y, unsigned long button_flags, unsigned long key_flags);
48
 
  void RecvMouseDoubleClick(int x, int y, unsigned long button_flags, unsigned long key_flags);
49
 
  // TODO: can be safely removed once OnMouseDoubleClick is fixed in nux
50
 
  void RecvMouseUp(int x, int y, unsigned long button_flags, unsigned long key_flags);
51
 
  struct timespec time_diff(struct timespec start, struct timespec end);
52
 
 
53
 
  const gchar* GetName();
54
 
  const gchar* GetChildsName();
 
43
  std::string GetName() const;
55
44
  void         AddProperties(GVariantBuilder* builder);
56
45
 
57
 
  struct timespec _last_click_time;
58
46
  Cursor _grab_cursor;
59
47
};
60
48