mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 10:12:25 -05:00
f87041bf3a
Resulting in a massive rename across almost everywhere! Alongside the namespace change, we now have the following names: * JS::NonnullGCPtr -> GC::Ref * JS::GCPtr -> GC::Ptr * JS::HeapFunction -> GC::Function * JS::CellImpl -> GC::Cell * JS::Handle -> GC::Root
55 lines
1.1 KiB
C++
55 lines
1.1 KiB
C++
/*
|
|
* Copyright (c) 2023, Bastiaan van der Plaat <bastiaan.v.d.plaat@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/String.h>
|
|
#include <LibIPC/Forward.h>
|
|
#include <LibWeb/HTML/HTMLOptionElement.h>
|
|
|
|
namespace Web::HTML {
|
|
|
|
struct SelectItemOption {
|
|
u32 id { 0 };
|
|
bool selected { false };
|
|
bool disabled { false };
|
|
GC::Ptr<HTMLOptionElement> option_element {};
|
|
String label {};
|
|
String value {};
|
|
};
|
|
|
|
struct SelectItemOptionGroup {
|
|
String label = {};
|
|
Vector<SelectItemOption> items = {};
|
|
};
|
|
|
|
struct SelectItemSeparator { };
|
|
|
|
using SelectItem = Variant<SelectItemOption, SelectItemOptionGroup, SelectItemSeparator>;
|
|
|
|
}
|
|
|
|
namespace IPC {
|
|
|
|
template<>
|
|
ErrorOr<void> encode(Encoder&, Web::HTML::SelectItemOption const&);
|
|
|
|
template<>
|
|
ErrorOr<Web::HTML::SelectItemOption> decode(Decoder&);
|
|
|
|
template<>
|
|
ErrorOr<void> encode(Encoder&, Web::HTML::SelectItemOptionGroup const&);
|
|
|
|
template<>
|
|
ErrorOr<Web::HTML::SelectItemOptionGroup> decode(Decoder&);
|
|
|
|
template<>
|
|
ErrorOr<void> encode(Encoder&, Web::HTML::SelectItemSeparator const&);
|
|
|
|
template<>
|
|
ErrorOr<Web::HTML::SelectItemSeparator> decode(Decoder&);
|
|
|
|
}
|