#ifndef UI_PLATFORM_WINDOW_PLATFORM_WINDOW_INIT_PROPERTIES_H_
#define UI_PLATFORM_WINDOW_PLATFORM_WINDOW_INIT_PROPERTIES_H_
#include <optional>
#include <string>
#include "base/component_export.h"
#include "base/memory/raw_ptr.h"
#include "build/build_config.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/ui_base_types.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/native_ui_types.h"
#if BUILDFLAG(IS_FUCHSIA)
#include <fuchsia/element/cpp/fidl.h>
#include <fuchsia/ui/composition/cpp/fidl.h>
#include <fuchsia/ui/views/cpp/fidl.h>
#include <ui/platform_window/fuchsia/view_ref_pair.h>
#endif
namespace gfx {
class ImageSkia;
}
namespace ui {
enum class PlatformWindowType {
kWindow,
kPopup,
kMenu,
kTooltip,
kDrag,
kBubble,
};
enum class PlatformWindowOpacity {
kInferOpacity,
kOpaqueWindow,
kTranslucentWindow,
};
enum class PlatformWindowShadowType {
kDefault,
kNone,
kDrop,
};
class WorkspaceExtensionDelegate;
#if BUILDFLAG(IS_FUCHSIA)
class ScenicWindowDelegate;
#endif
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
class X11ExtensionDelegate;
#endif
struct COMPONENT_EXPORT(PLATFORM_WINDOW) PlatformWindowInitProperties {
PlatformWindowInitProperties();
explicit PlatformWindowInitProperties(const gfx::Rect& bounds);
PlatformWindowInitProperties(PlatformWindowInitProperties&& props);
PlatformWindowInitProperties& operator=(PlatformWindowInitProperties&&);
~PlatformWindowInitProperties();
PlatformWindowType type = PlatformWindowType::kWindow;
gfx::Rect bounds;
gfx::AcceleratedWidget parent_widget = gfx::kNullAcceleratedWidget;
PlatformWindowOpacity opacity = PlatformWindowOpacity::kOpaqueWindow;
#if BUILDFLAG(IS_FUCHSIA)
fuchsia::ui::views::ViewToken view_token;
fuchsia::ui::views::ViewCreationToken view_creation_token;
ViewRefPair view_ref_pair;
fuchsia::element::ViewControllerPtr view_controller;
bool enable_keyboard = false;
bool enable_virtual_keyboard = false;
raw_ptr<ScenicWindowDelegate> scenic_window_delegate = nullptr;
#endif
bool accept_events = true;
bool activatable = true;
bool keep_on_top = false;
bool is_security_surface = false;
bool visible_on_all_workspaces = false;
bool remove_standard_frame = false;
std::string workspace;
ZOrderLevel z_order = ZOrderLevel::kNormal;
raw_ptr<WorkspaceExtensionDelegate> workspace_extension_delegate = nullptr;
PlatformWindowShadowType shadow_type = PlatformWindowShadowType::kDefault;
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
bool prefer_dark_theme = false;
raw_ptr<gfx::ImageSkia> icon = nullptr;
std::optional<SkColor> background_color;
std::string wm_role_name;
std::string wm_class_name;
std::string wm_class_class;
raw_ptr<X11ExtensionDelegate> x11_extension_delegate = nullptr;
std::string wayland_app_id;
std::optional<int64_t> display_id;
#endif
#if BUILDFLAG(IS_OZONE)
bool inhibit_keyboard_shortcuts = false;
std::string session_id;
int32_t session_window_new_id = 0;
std::optional<int32_t> session_window_restore_id;
#endif
bool enable_compositing_based_throttling = false;
size_t compositor_memory_limit_mb = 0;
#if BUILDFLAG(IS_OHOS)
std::optional<SkColor> background_color;
#endif
};
}
#endif