Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / ash / wm / drag_details.h
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ASH_WM_DRAG_DETAILS_H_
6 #define ASH_WM_DRAG_DETAILS_H_
7
8 #include "ash/ash_export.h"
9 #include "ash/wm/wm_types.h"
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "ui/aura/client/window_move_client.h"
13 #include "ui/gfx/rect.h"
14
15 namespace aura {
16 class Window;
17 }
18
19 namespace ash {
20
21 namespace wm {
22 class WindowState;
23 }
24
25 struct ASH_EXPORT DragDetails {
26   DragDetails(aura::Window* window,
27               const gfx::Point& location,
28               int window_component,
29               aura::client::WindowMoveSource source);
30   ~DragDetails();
31
32   // Initial show type.
33   ash::wm::WindowShowType initial_show_type;
34
35   // Initial bounds of the window in parent coordinates.
36   const gfx::Rect initial_bounds_in_parent;
37
38   // Restore bounds (in screen coordinates) of the window before the drag
39   // started. Only set if the window is normal and is being dragged.
40   gfx::Rect restore_bounds;
41
42   // Location passed to the constructor, in |window->parent()|'s coordinates.
43   const gfx::Point initial_location_in_parent;
44
45   // Initial opacity of the window.
46   const float initial_opacity;
47
48   // The component the user pressed on.
49   const int window_component;
50
51   // Bitmask of the |kBoundsChange_| constants.
52   const int bounds_change;
53
54   // Bitmask of the |kBoundsChangeDirection_| constants.
55   const int position_change_direction;
56
57   // Bitmask of the |kBoundsChangeDirection_| constants.
58   const int size_change_direction;
59
60   // Will the drag actually modify the window?
61   const bool is_resizable;
62
63   // Source of the event initiating the drag.
64   const aura::client::WindowMoveSource source;
65
66   // True if the window should attach to the shelf after releasing.
67   bool should_attach_to_shelf;
68 };
69
70 }  // namespace ash
71
72 #endif  // ASH_WM_DRAG_DETAILS_H_