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

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

PyTypeObject* py::winrt_type<winrt::Windows::ApplicationModel::Holographic::HolographicKeyboard>::python_type;

namespace py::cpp::Windows::ApplicationModel::Holographic
{
    // ----- HolographicKeyboard class --------------------
    constexpr const char* const _type_name_HolographicKeyboard = "HolographicKeyboard";

    static PyObject* _new_HolographicKeyboard(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        py::set_invalid_activation_error(_type_name_HolographicKeyboard);
        return nullptr;
    }

    static void _dealloc_HolographicKeyboard(py::wrapper::Windows::ApplicationModel::Holographic::HolographicKeyboard* self)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* HolographicKeyboard_GetDefault(PyObject* /*unused*/, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                return py::convert(winrt::Windows::ApplicationModel::Holographic::HolographicKeyboard::GetDefault());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* HolographicKeyboard_ResetPlacementOverride(py::wrapper::Windows::ApplicationModel::Holographic::HolographicKeyboard* self, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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* HolographicKeyboard_SetPlacementOverride(py::wrapper::Windows::ApplicationModel::Holographic::HolographicKeyboard* self, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 3)
        {
            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::quaternion>(args, 2);

                self->obj.SetPlacementOverride(param0, param1, param2);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 4)
        {
            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::quaternion>(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* _from_HolographicKeyboard(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::Holographic::HolographicKeyboard>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_HolographicKeyboard[] = {
        { "get_default", reinterpret_cast<PyCFunction>(HolographicKeyboard_GetDefault), METH_VARARGS | METH_STATIC, nullptr },
        { "reset_placement_override", reinterpret_cast<PyCFunction>(HolographicKeyboard_ResetPlacementOverride), METH_VARARGS, nullptr },
        { "set_placement_override", reinterpret_cast<PyCFunction>(HolographicKeyboard_SetPlacementOverride), METH_VARARGS, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_HolographicKeyboard), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_HolographicKeyboard[] = {
        { }
    };

    static PyType_Slot _type_slots_HolographicKeyboard[] = 
    {
        { Py_tp_new, _new_HolographicKeyboard },
        { Py_tp_dealloc, _dealloc_HolographicKeyboard },
        { Py_tp_methods, _methods_HolographicKeyboard },
        { Py_tp_getset, _getset_HolographicKeyboard },
        { },
    };

    static PyType_Spec _type_spec_HolographicKeyboard =
    {
        "_winsdk_Windows_ApplicationModel_Holographic.HolographicKeyboard",
        sizeof(py::wrapper::Windows::ApplicationModel::Holographic::HolographicKeyboard),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_HolographicKeyboard
    };

    // ----- Windows.ApplicationModel.Holographic Initialization --------------------
    static int module_exec(PyObject* module) noexcept
    {
        try
        {
            py::pyobj_handle bases { PyTuple_Pack(1, py::winrt_type<py::Object>::python_type) };

            py::winrt_type<winrt::Windows::ApplicationModel::Holographic::HolographicKeyboard>::python_type = py::register_python_type(module, _type_name_HolographicKeyboard, &_type_spec_HolographicKeyboard, bases.get());

            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyModuleDef_Slot module_slots[] = {{Py_mod_exec, module_exec}, {}};

    PyDoc_STRVAR(module_doc, "Windows.ApplicationModel.Holographic");

    static PyModuleDef module_def
        = {PyModuleDef_HEAD_INIT,
           "_winsdk_Windows_ApplicationModel_Holographic",
           module_doc,
           0,
           nullptr,
           module_slots,
           nullptr,
           nullptr,
           nullptr};
} // py::cpp::Windows::ApplicationModel::Holographic

PyMODINIT_FUNC
PyInit__winsdk_Windows_ApplicationModel_Holographic (void) noexcept
{
    return PyModuleDef_Init(&py::cpp::Windows::ApplicationModel::Holographic::module_def);
}
