WebViewHints.h 632 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (c) 2024, Andrew Kaster <akaster@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/Optional.h>
  8. #include <AK/Types.h>
  9. #include <LibIPC/Forward.h>
  10. #include <LibWeb/PixelUnits.h>
  11. namespace Web::HTML {
  12. struct WebViewHints {
  13. bool popup = false;
  14. Optional<DevicePixels> width = {};
  15. Optional<DevicePixels> height = {};
  16. Optional<DevicePixels> screen_x = {};
  17. Optional<DevicePixels> screen_y = {};
  18. };
  19. }
  20. namespace IPC {
  21. template<>
  22. ErrorOr<void> encode(Encoder&, Web::HTML::WebViewHints const&);
  23. template<>
  24. ErrorOr<Web::HTML::WebViewHints> decode(Decoder&);
  25. }