//
// Automatically generated by ipdlc.
// Edit at your own risk
//

#ifndef PlatformWidgetTypes_h
#define PlatformWidgetTypes_h

#include "mozilla/Attributes.h"
#include "IPCMessageStart.h"
#include "mozilla/RefPtr.h"
#include "nsString.h"
#include "nsTArray.h"
#include "nsTHashtable.h"
#include "mozilla/MozPromise.h"
#include "mozilla/OperatorNewExtensions.h"
#include "mozilla/UniquePtr.h"
#include "mozilla/ipc/ByteBuf.h"
#include "mozilla/ipc/FileDescriptor.h"
#include "mozilla/ipc/IPCForwards.h"
#include "mozilla/ipc/Shmem.h"

// Headers for typedefs
#include "Units.h"
#include "mozilla/ipc/IPDLStructMember.h"
#include "mozilla/widget/HeadlessWidgetTypes.h"


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct GtkCompositorWidgetInitData|
//
namespace mozilla {
namespace widget {
class GtkCompositorWidgetInitData final
{
private:
    typedef ::uintptr_t uintptr_t;
    typedef ::nsCString nsCString;
    typedef ::mozilla::LayoutDeviceIntSize LayoutDeviceIntSize;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    GtkCompositorWidgetInitData() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT GtkCompositorWidgetInitData(
            const uintptr_t& _XWindow,
            const nsCString& _XDisplayString,
            const bool& _IsX11Display,
            const LayoutDeviceIntSize& _InitialClientSize) :
        XWindow_(_XWindow),
        XDisplayString_(_XDisplayString),
        IsX11Display_(_IsX11Display),
        InitialClientSize_(_InitialClientSize)
    {
    }

    MOZ_IMPLICIT GtkCompositorWidgetInitData(
            uintptr_t&& _XWindow,
            nsCString&& _XDisplayString,
            bool&& _IsX11Display,
            LayoutDeviceIntSize&& _InitialClientSize) :
        XWindow_(std::move(_XWindow)),
        XDisplayString_(std::move(_XDisplayString)),
        IsX11Display_(std::move(_IsX11Display)),
        InitialClientSize_(std::move(_InitialClientSize))
    {
    }

    uintptr_t&
    XWindow()
    {
        return XWindow_;
    }
    const uintptr_t&
    XWindow() const
    {
        return XWindow_;
    }

    nsCString&
    XDisplayString()
    {
        return XDisplayString_;
    }
    const nsCString&
    XDisplayString() const
    {
        return XDisplayString_;
    }

    bool&
    IsX11Display()
    {
        return IsX11Display_;
    }
    const bool&
    IsX11Display() const
    {
        return IsX11Display_;
    }

    LayoutDeviceIntSize&
    InitialClientSize()
    {
        return InitialClientSize_;
    }
    const LayoutDeviceIntSize&
    InitialClientSize() const
    {
        return InitialClientSize_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<uintptr_t> XWindow_;
    ::mozilla::ipc::IPDLStructMember<nsCString> XDisplayString_;
    ::mozilla::ipc::IPDLStructMember<bool> IsX11Display_;
    ::mozilla::ipc::IPDLStructMember<LayoutDeviceIntSize> InitialClientSize_;
};
} // namespace widget
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::widget::GtkCompositorWidgetInitData>
{
    typedef ::mozilla::widget::GtkCompositorWidgetInitData paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |union CompositorWidgetInitData|
//
namespace mozilla {
namespace widget {
class CompositorWidgetInitData final
{
public:
    enum Type {
        T__None,
        TGtkCompositorWidgetInitData = 1,
        THeadlessCompositorWidgetInitData,
        T__Last = THeadlessCompositorWidgetInitData
    };

private:
    typedef ::mozilla::widget::GtkCompositorWidgetInitData GtkCompositorWidgetInitData;
    typedef ::mozilla::widget::HeadlessCompositorWidgetInitData HeadlessCompositorWidgetInitData;
    typedef GtkCompositorWidgetInitData GtkCompositorWidgetInitData__tdef;
    typedef HeadlessCompositorWidgetInitData HeadlessCompositorWidgetInitData__tdef;

    GtkCompositorWidgetInitData*
    ptr_GtkCompositorWidgetInitData()
    {
        return (&(mVGtkCompositorWidgetInitData));
    }
    const GtkCompositorWidgetInitData*
    constptr_GtkCompositorWidgetInitData() const
    {
        return (&(mVGtkCompositorWidgetInitData));
    }
    HeadlessCompositorWidgetInitData*
    ptr_HeadlessCompositorWidgetInitData()
    {
        return (&(mVHeadlessCompositorWidgetInitData));
    }
    const HeadlessCompositorWidgetInitData*
    constptr_HeadlessCompositorWidgetInitData() const
    {
        return (&(mVHeadlessCompositorWidgetInitData));
    }

    void
    MaybeDestroy();

    void
    AssertSanity() const
    {
        MOZ_RELEASE_ASSERT((T__None) <= (mType), "invalid type tag");
        MOZ_RELEASE_ASSERT((mType) <= (T__Last), "invalid type tag");
    }
    void
    AssertSanity(Type aType) const
    {
        AssertSanity();
        MOZ_RELEASE_ASSERT((mType) == (aType), "unexpected type tag");
    }

public:
    MOZ_IMPLICIT CompositorWidgetInitData() :
        mType(T__None)
    {
    }

    MOZ_IMPLICIT CompositorWidgetInitData(const GtkCompositorWidgetInitData& aOther);

    MOZ_IMPLICIT CompositorWidgetInitData(GtkCompositorWidgetInitData&& aOther);

    MOZ_IMPLICIT CompositorWidgetInitData(const HeadlessCompositorWidgetInitData& aOther);

    MOZ_IMPLICIT CompositorWidgetInitData(HeadlessCompositorWidgetInitData&& aOther);

    MOZ_IMPLICIT CompositorWidgetInitData(const CompositorWidgetInitData& aOther);

    MOZ_IMPLICIT CompositorWidgetInitData(CompositorWidgetInitData&& aOther);

    ~CompositorWidgetInitData();

    Type
    type() const
    {
        return mType;
    }

    CompositorWidgetInitData&
    operator=(const GtkCompositorWidgetInitData& aRhs);

    CompositorWidgetInitData&
    operator=(GtkCompositorWidgetInitData&& aRhs);

    CompositorWidgetInitData&
    operator=(const HeadlessCompositorWidgetInitData& aRhs);

    CompositorWidgetInitData&
    operator=(HeadlessCompositorWidgetInitData&& aRhs);

    CompositorWidgetInitData&
    operator=(const CompositorWidgetInitData& aRhs);

    CompositorWidgetInitData&
    operator=(CompositorWidgetInitData&& aRhs);

    GtkCompositorWidgetInitData&
    get_GtkCompositorWidgetInitData()
    {
        AssertSanity(TGtkCompositorWidgetInitData);
        return (*(ptr_GtkCompositorWidgetInitData()));
    }
    const GtkCompositorWidgetInitData&
    get_GtkCompositorWidgetInitData() const
    {
        AssertSanity(TGtkCompositorWidgetInitData);
        return (*(constptr_GtkCompositorWidgetInitData()));
    }
    operator GtkCompositorWidgetInitData&()
    {
        return get_GtkCompositorWidgetInitData();
    }
    operator const GtkCompositorWidgetInitData&() const
    {
        return get_GtkCompositorWidgetInitData();
    }

    HeadlessCompositorWidgetInitData&
    get_HeadlessCompositorWidgetInitData()
    {
        AssertSanity(THeadlessCompositorWidgetInitData);
        return (*(ptr_HeadlessCompositorWidgetInitData()));
    }
    const HeadlessCompositorWidgetInitData&
    get_HeadlessCompositorWidgetInitData() const
    {
        AssertSanity(THeadlessCompositorWidgetInitData);
        return (*(constptr_HeadlessCompositorWidgetInitData()));
    }
    operator HeadlessCompositorWidgetInitData&()
    {
        return get_HeadlessCompositorWidgetInitData();
    }
    operator const HeadlessCompositorWidgetInitData&() const
    {
        return get_HeadlessCompositorWidgetInitData();
    }

private:
    union {
        GtkCompositorWidgetInitData mVGtkCompositorWidgetInitData;
        HeadlessCompositorWidgetInitData mVHeadlessCompositorWidgetInitData;
    };
    Type mType;
};
} // namespace widget
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::widget::CompositorWidgetInitData>
{
    typedef ::mozilla::widget::CompositorWidgetInitData paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC

#endif // ifndef PlatformWidgetTypes_h
