// WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2

#include "py.Windows.ApplicationModel.Preview.Holographic.h"


namespace py::cpp::Windows::ApplicationModel::Preview::Holographic
{
    // ----- HolographicApplicationPreview class --------------------

    static PyObject* _new_HolographicApplicationPreview(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::ApplicationModel::Preview::Holographic::HolographicApplicationPreview>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::ApplicationModel::Preview::Holographic::HolographicApplicationPreview>::type_name);
        return nullptr;
    }

    static PyObject* HolographicApplicationPreview_IsCurrentViewPresentedOnHolographicDisplay(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Holographic.HolographicApplicationPreview", L"IsCurrentViewPresentedOnHolographicDisplay", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(winrt::Windows::ApplicationModel::Preview::Holographic::HolographicApplicationPreview::IsCurrentViewPresentedOnHolographicDisplay());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* HolographicApplicationPreview_IsHolographicActivation(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Holographic.HolographicApplicationPreview", L"IsHolographicActivation", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::ApplicationModel::Activation::IActivatedEventArgs>(args, 0);

                return py::convert(winrt::Windows::ApplicationModel::Preview::Holographic::HolographicApplicationPreview::IsHolographicActivation(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyMethodDef _methods_HolographicApplicationPreview[] = {
        { }
    };

    static PyGetSetDef _getset_HolographicApplicationPreview[] = {
        { }
    };

    static PyType_Slot _type_slots_HolographicApplicationPreview[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_HolographicApplicationPreview) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_HolographicApplicationPreview) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_HolographicApplicationPreview) },
        { },
    };

    static PyType_Spec type_spec_HolographicApplicationPreview =
    {
        "winrt._winrt_windows_applicationmodel_preview_holographic.HolographicApplicationPreview",
        0,
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_HolographicApplicationPreview
    };

    static PyGetSetDef getset_HolographicApplicationPreview_Static[] = {
        { }
    };

    static PyMethodDef methods_HolographicApplicationPreview_Static[] = {
        { "is_current_view_presented_on_holographic_display", reinterpret_cast<PyCFunction>(HolographicApplicationPreview_IsCurrentViewPresentedOnHolographicDisplay), METH_VARARGS, nullptr },
        { "is_holographic_activation", reinterpret_cast<PyCFunction>(HolographicApplicationPreview_IsHolographicActivation), METH_VARARGS, nullptr },
        { }
    };

    static PyType_Slot type_slots_HolographicApplicationPreview_Static[] = 
    {
        { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
        { Py_tp_getset, reinterpret_cast<void*>(getset_HolographicApplicationPreview_Static) },
        { Py_tp_methods, reinterpret_cast<void*>(methods_HolographicApplicationPreview_Static) },
        { }
    };

    static PyType_Spec type_spec_HolographicApplicationPreview_Static =
    {
        "winrt._winrt_windows_applicationmodel_preview_holographic.HolographicApplicationPreview_Static",
        static_cast<int>(PyType_Type.tp_basicsize),
        static_cast<int>(PyType_Type.tp_itemsize),
        Py_TPFLAGS_DEFAULT,
        type_slots_HolographicApplicationPreview_Static
    };

    // ----- HolographicKeyboardPlacementOverridePreview class --------------------

    static PyObject* _new_HolographicKeyboardPlacementOverridePreview(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::ApplicationModel::Preview::Holographic::HolographicKeyboardPlacementOverridePreview>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::ApplicationModel::Preview::Holographic::HolographicKeyboardPlacementOverridePreview>::type_name);
        return nullptr;
    }

    static void _dealloc_HolographicKeyboardPlacementOverridePreview(py::wrapper::Windows::ApplicationModel::Preview::Holographic::HolographicKeyboardPlacementOverridePreview* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* HolographicKeyboardPlacementOverridePreview_GetForCurrentView(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Holographic.HolographicKeyboardPlacementOverridePreview", L"GetForCurrentView", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(winrt::Windows::ApplicationModel::Preview::Holographic::HolographicKeyboardPlacementOverridePreview::GetForCurrentView());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* HolographicKeyboardPlacementOverridePreview_ResetPlacementOverride(py::wrapper::Windows::ApplicationModel::Preview::Holographic::HolographicKeyboardPlacementOverridePreview* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Holographic.HolographicKeyboardPlacementOverridePreview", L"ResetPlacementOverride", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.ResetPlacementOverride();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* HolographicKeyboardPlacementOverridePreview_SetPlacementOverride(py::wrapper::Windows::ApplicationModel::Preview::Holographic::HolographicKeyboardPlacementOverridePreview* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 3)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Holographic.HolographicKeyboardPlacementOverridePreview", L"SetPlacementOverride", 3))
            {
                py::set_arg_count_version_error(3);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Perception::Spatial::SpatialCoordinateSystem>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Foundation::Numerics::float3>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Foundation::Numerics::float3>(args, 2);

                self->obj.SetPlacementOverride(param0, param1, param2);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 4)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Holographic.HolographicKeyboardPlacementOverridePreview", L"SetPlacementOverride", 4))
            {
                py::set_arg_count_version_error(4);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Perception::Spatial::SpatialCoordinateSystem>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Foundation::Numerics::float3>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Foundation::Numerics::float3>(args, 2);
                auto param3 = py::convert_to<winrt::Windows::Foundation::Numerics::float2>(args, 3);

                self->obj.SetPlacementOverride(param0, param1, param2, param3);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* _assign_array_HolographicKeyboardPlacementOverridePreview(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Preview::Holographic::HolographicKeyboardPlacementOverridePreview>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_HolographicKeyboardPlacementOverridePreview(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::ApplicationModel::Preview::Holographic::HolographicKeyboardPlacementOverridePreview>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_HolographicKeyboardPlacementOverridePreview[] = {
        { "reset_placement_override", reinterpret_cast<PyCFunction>(HolographicKeyboardPlacementOverridePreview_ResetPlacementOverride), METH_VARARGS, nullptr },
        { "set_placement_override", reinterpret_cast<PyCFunction>(HolographicKeyboardPlacementOverridePreview_SetPlacementOverride), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_HolographicKeyboardPlacementOverridePreview, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_HolographicKeyboardPlacementOverridePreview), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_HolographicKeyboardPlacementOverridePreview[] = {
        { }
    };

    static PyType_Slot _type_slots_HolographicKeyboardPlacementOverridePreview[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_HolographicKeyboardPlacementOverridePreview) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_HolographicKeyboardPlacementOverridePreview) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_HolographicKeyboardPlacementOverridePreview) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_HolographicKeyboardPlacementOverridePreview) },
        { },
    };

    static PyType_Spec type_spec_HolographicKeyboardPlacementOverridePreview =
    {
        "winrt._winrt_windows_applicationmodel_preview_holographic.HolographicKeyboardPlacementOverridePreview",
        sizeof(py::wrapper::Windows::ApplicationModel::Preview::Holographic::HolographicKeyboardPlacementOverridePreview),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_HolographicKeyboardPlacementOverridePreview
    };

    static PyGetSetDef getset_HolographicKeyboardPlacementOverridePreview_Static[] = {
        { }
    };

    static PyMethodDef methods_HolographicKeyboardPlacementOverridePreview_Static[] = {
        { "get_for_current_view", reinterpret_cast<PyCFunction>(HolographicKeyboardPlacementOverridePreview_GetForCurrentView), METH_VARARGS, nullptr },
        { }
    };

    static PyType_Slot type_slots_HolographicKeyboardPlacementOverridePreview_Static[] = 
    {
        { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
        { Py_tp_getset, reinterpret_cast<void*>(getset_HolographicKeyboardPlacementOverridePreview_Static) },
        { Py_tp_methods, reinterpret_cast<void*>(methods_HolographicKeyboardPlacementOverridePreview_Static) },
        { }
    };

    static PyType_Spec type_spec_HolographicKeyboardPlacementOverridePreview_Static =
    {
        "winrt._winrt_windows_applicationmodel_preview_holographic.HolographicKeyboardPlacementOverridePreview_Static",
        static_cast<int>(PyType_Type.tp_basicsize),
        static_cast<int>(PyType_Type.tp_itemsize),
        Py_TPFLAGS_DEFAULT,
        type_slots_HolographicKeyboardPlacementOverridePreview_Static
    };

    // ----- Windows.ApplicationModel.Preview.Holographic Initialization --------------------
    PyDoc_STRVAR(module_doc, "Windows::ApplicationModel::Preview::Holographic");


    static PyModuleDef module_def
        = {PyModuleDef_HEAD_INIT,
           "_winrt_windows_applicationmodel_preview_holographic",
           module_doc,
           0,
           nullptr,
           nullptr,
           nullptr,
           nullptr,
           nullptr};

} // py::cpp::Windows::ApplicationModel::Preview::Holographic

PyMODINIT_FUNC PyInit__winrt_windows_applicationmodel_preview_holographic(void) noexcept
{
    using namespace py::cpp::Windows::ApplicationModel::Preview::Holographic;

    if (py::import_winrt_runtime() == -1)
    {
        return nullptr;
    }

    py::pyobj_handle module{PyModule_Create(&module_def)};

    if (!module)
    {
        return nullptr;
    }

    auto object_type = py::get_object_type();
    if (!object_type)
    {
        return nullptr;
    }

    py::pyobj_handle object_bases{PyTuple_Pack(1, object_type)};

    if (!object_bases)
    {
        return nullptr;
    }

    py::pyobj_handle type_HolographicApplicationPreview_Static{PyType_FromSpec(&type_spec_HolographicApplicationPreview_Static)};
    if (!type_HolographicApplicationPreview_Static)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_HolographicApplicationPreview, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_HolographicApplicationPreview_Static.get())) == -1)
    {
        return nullptr;
    }

    py::pyobj_handle type_HolographicKeyboardPlacementOverridePreview_Static{PyType_FromSpec(&type_spec_HolographicKeyboardPlacementOverridePreview_Static)};
    if (!type_HolographicKeyboardPlacementOverridePreview_Static)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_HolographicKeyboardPlacementOverridePreview, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_HolographicKeyboardPlacementOverridePreview_Static.get())) == -1)
    {
        return nullptr;
    }


    return module.detach();
}
