From f1e14a68ef3c056fab85ee43f331c1fa8b40b932 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sun, 26 Apr 2020 13:17:15 +0100 Subject: Add support for element-type to GListModel GListModel is an interface for creating typed, list-like containers. The data stored is GObject instances, but it's useful to be able to annotate the actual type, for both documentation and code generation purposes. The annotation should be optional, to maintain backward compatibility. Fixes: #328 --- .../Regress.test_list_model_object.page | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tests/scanner/Regress-1.0-Python-expected/Regress.test_list_model_object.page (limited to 'tests/scanner/Regress-1.0-Python-expected/Regress.test_list_model_object.page') diff --git a/tests/scanner/Regress-1.0-Python-expected/Regress.test_list_model_object.page b/tests/scanner/Regress-1.0-Python-expected/Regress.test_list_model_object.page new file mode 100644 index 00000000..d9dca201 --- /dev/null +++ b/tests/scanner/Regress-1.0-Python-expected/Regress.test_list_model_object.page @@ -0,0 +1,32 @@ + + + + + + + Gio.ListModel(item_type=Regress.TestObj) + + regress_test_list_model_object + + + Regress.test_list_model_object + +@returns(Gio.ListModel(item_type=Regress.TestObj)) +def test_list_model_object(): + # Python wrapper for regress_test_list_model_object() + +

Test GListModel return value with an element type annotation.

+ + + +<code>Returns</code> +{formatter.format(node, node.retval.doc)} + + + +
-- cgit v1.2.1