drag_details.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. #ifndef ASH_WM_DRAG_DETAILS_H_
  5. #define ASH_WM_DRAG_DETAILS_H_
  6. #include "chromeos/ui/base/window_state_type.h"
  7. #include "ui/gfx/geometry/point_f.h"
  8. #include "ui/gfx/geometry/rect.h"
  9. #include "ui/wm/public/window_move_client.h"
  10. namespace aura {
  11. class Window;
  12. }
  13. namespace ash {
  14. struct DragDetails {
  15. DragDetails(aura::Window* window,
  16. const gfx::PointF& location,
  17. int window_component,
  18. // TODO(sky): make wm type.
  19. ::wm::WindowMoveSource source);
  20. ~DragDetails();
  21. const chromeos::WindowStateType initial_state_type;
  22. // Initial bounds of the window in parent coordinates.
  23. const gfx::Rect initial_bounds_in_parent;
  24. // Restore bounds in parent coordinates of the window before the drag
  25. // started. Only set if the window is being dragged from the caption.
  26. const gfx::Rect restore_bounds_in_parent;
  27. // Location passed to the constructor, in |window->parent()|'s coordinates.
  28. const gfx::PointF initial_location_in_parent;
  29. // The component the user pressed on.
  30. const int window_component;
  31. // Bitmask of the |kBoundsChange_| constants.
  32. const int bounds_change;
  33. // Bitmask of the |kBoundsChangeDirection_| constants.
  34. const int size_change_direction;
  35. // Will the drag actually modify the window?
  36. const bool is_resizable;
  37. // Source of the event initiating the drag.
  38. const ::wm::WindowMoveSource source;
  39. };
  40. } // namespace ash
  41. #endif // ASH_WM_DRAG_DETAILS_H_