From 34ca50dca868e565ad1fcf61857fa7e2a55e21e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 17 Sep 2019 16:13:16 +0200 Subject: [PATCH] python: expose application properties as actual properties. --- src/python/magnum/platform/application.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/python/magnum/platform/application.h b/src/python/magnum/platform/application.h index 4e325b4..ee1a5b1 100644 --- a/src/python/magnum/platform/application.h +++ b/src/python/magnum/platform/application.h @@ -65,8 +65,8 @@ template void application(py::class_& .def("swap_buffers", &T::swapBuffers, "Swap buffers") /** @todo setMinimalLoopPeriod, needs a getter */ .def("redraw", &T::redraw, "Redraw immediately") - .def("window_size", &T::windowSize, "Window size") - .def("framebuffer_size", &T::framebufferSize, "Framebuffer size") + .def_property_readonly("window_size", &T::windowSize, "Window size") + .def_property_readonly("framebuffer_size", &T::framebufferSize, "Framebuffer size") /* Event handlers */ .def("draw_event", &T::drawEvent, "Draw event")