screen_infos.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright 2021 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 UI_DISPLAY_SCREEN_INFOS_H_
  5. #define UI_DISPLAY_SCREEN_INFOS_H_
  6. #include "ui/display/display_export.h"
  7. #include "ui/display/screen_info.h"
  8. namespace display {
  9. // Information about a set of screens that are relevant to a particular widget.
  10. // This includes an id for the screen currently showing the widget.
  11. // This structure roughly parallels display::DisplayList. It may be desirable to
  12. // deprecate derived counterparts of ui/display types; see crbug.com/1208469.
  13. struct DISPLAY_EXPORT ScreenInfos {
  14. ScreenInfos();
  15. explicit ScreenInfos(const ScreenInfo& screen_info);
  16. ScreenInfos(const ScreenInfos& other);
  17. ~ScreenInfos();
  18. ScreenInfos& operator=(const ScreenInfos& other);
  19. bool operator==(const ScreenInfos& other) const;
  20. bool operator!=(const ScreenInfos& other) const;
  21. // Helpers to access the current ScreenInfo element.
  22. ScreenInfo& mutable_current();
  23. const ScreenInfo& current() const;
  24. std::vector<ScreenInfo> screen_infos;
  25. // The display_id of the current ScreenInfo in `screen_infos`.
  26. int64_t current_display_id = kInvalidDisplayId;
  27. // Cursor size in DIP, obtained from the OS. This value is general
  28. // to all displays. This value is only set on Windows.
  29. gfx::Size system_cursor_size;
  30. };
  31. } // namespace display
  32. #endif // UI_DISPLAY_SCREEN_INFOS_H_