From f5548c41883fe0b1a08493bf9cc075a0311d1ade Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Sat, 3 May 2014 10:55:24 +0200 Subject: docwriter: Add possibility to export the API in json format --- giscanner/docmain.py | 6 + giscanner/docwriter.py | 189 ++- tests/gi-tester | 4 + tests/scanner/Makefile.am | 8 +- .../Regress-1.0-expected.json/Regress-1.0.json | 1352 ++++++++++++++++++++ .../Regress.ATestError.json | 22 + .../Regress.AnAnonymousUnion.json | 19 + .../Regress.AnnotationFields.json | 24 + .../Regress.AnnotationObject.json | 584 +++++++++ .../Regress.AnnotationObjectClass.json | 14 + .../Regress.AnnotationStruct.json | 14 + .../Regress.FooASingle.json | 12 + .../Regress.FooAddressType.json | 22 + .../Regress.FooBRect.json | 59 + .../Regress.FooBoxed.json | 28 + .../Regress.FooBuffer.json | 20 + .../Regress.FooBufferClass.json | 8 + .../Regress.FooDBusData.json | 18 + .../Regress.FooEnumFullname.json | 22 + .../Regress.FooEnumNoType.json | 27 + .../Regress.FooEnumType.json | 22 + .../Regress.FooError.json | 22 + .../Regress.FooEventAny.json | 14 + .../Regress.FooEventExpose.json | 19 + .../Regress.FooForeignStruct.json | 34 + .../Regress.FooInterfaceIface.json | 19 + .../Regress.FooObject.json | 315 +++++ .../Regress.FooObjectClass.json | 29 + .../Regress.FooOtherObject.json | 10 + .../Regress.FooOtherObjectClass.json | 8 + .../Regress.FooRectangle.json | 80 ++ .../Regress.FooSkippable.json | 17 + .../Regress.FooStackLayer.json | 52 + .../Regress.FooStruct.json | 19 + .../Regress.FooStructPrivate.json | 8 + .../Regress.FooSubInterfaceIface.json | 29 + .../Regress.FooSubobject.json | 20 + .../Regress.FooSubobjectClass.json | 14 + .../Regress.FooThingWithArray.json | 29 + .../Regress.FooUtilityStruct.json | 14 + .../Regress-1.0-expected.json/Regress.Intset.json | 8 + .../Regress.LikeGnomeKeyringPasswordSchema.json | 24 + .../Regress.LikeXklConfigItem.json | 31 + .../Regress.SkippedStructure.json | 19 + .../Regress.TestABCError.json | 22 + .../Regress.TestBoxed.json | 123 ++ .../Regress.TestBoxedB.json | 52 + .../Regress.TestBoxedC.json | 29 + .../Regress.TestBoxedD.json | 59 + .../Regress.TestBoxedPrivate.json | 8 + .../Regress.TestDEFError.json | 22 + .../Regress.TestEnum.json | 27 + .../Regress.TestEnumNoGEnum.json | 22 + .../Regress.TestEnumUnsigned.json | 17 + .../Regress.TestError.json | 22 + .../Regress.TestFloating.json | 20 + .../Regress.TestFloatingClass.json | 14 + .../Regress.TestFundamentalObject.json | 48 + .../Regress.TestFundamentalObjectClass.json | 24 + .../Regress.TestFundamentalSubObject.json | 27 + .../Regress.TestFundamentalSubObjectClass.json | 14 + .../Regress.TestInheritDrawable.json | 87 ++ .../Regress.TestInheritDrawableClass.json | 14 + .../Regress.TestInheritPixmapObjectClass.json | 14 + .../Regress.TestInterfaceIface.json | 14 + .../Regress-1.0-expected.json/Regress.TestObj.json | 866 +++++++++++++ .../Regress.TestObjClass.json | 49 + .../Regress.TestOtherError.json | 22 + .../Regress.TestPrivateStruct.json | 24 + .../Regress.TestReferenceEnum.json | 37 + .../Regress.TestSimpleBoxedA.json | 64 + .../Regress.TestSimpleBoxedB.json | 29 + .../Regress.TestStructA.json | 68 + .../Regress.TestStructB.json | 36 + .../Regress.TestStructC.json | 19 + .../Regress.TestStructD.json | 34 + .../Regress.TestStructE.json | 19 + .../Regress.TestStructF.json | 44 + .../Regress.TestStructFixedArray.json | 29 + .../Regress.TestSubObj.json | 39 + .../Regress.TestSubObjClass.json | 14 + .../Regress.TestWi8021x.json | 69 + .../Regress.TestWi8021xClass.json | 14 + tests/scanner/Regress-1.0.json/Regress-1.0.json | 1352 ++++++++++++++++++++ .../Regress-1.0.json/Regress.ATestError.json | 22 + .../Regress-1.0.json/Regress.AnAnonymousUnion.json | 19 + .../Regress-1.0.json/Regress.AnnotationFields.json | 24 + .../Regress-1.0.json/Regress.AnnotationObject.json | 584 +++++++++ .../Regress.AnnotationObjectClass.json | 14 + .../Regress-1.0.json/Regress.AnnotationStruct.json | 14 + .../Regress-1.0.json/Regress.FooASingle.json | 12 + .../Regress-1.0.json/Regress.FooAddressType.json | 22 + .../scanner/Regress-1.0.json/Regress.FooBRect.json | 59 + .../scanner/Regress-1.0.json/Regress.FooBoxed.json | 28 + .../Regress-1.0.json/Regress.FooBuffer.json | 20 + .../Regress-1.0.json/Regress.FooBufferClass.json | 8 + .../Regress-1.0.json/Regress.FooDBusData.json | 18 + .../Regress-1.0.json/Regress.FooEnumFullname.json | 22 + .../Regress-1.0.json/Regress.FooEnumNoType.json | 27 + .../Regress-1.0.json/Regress.FooEnumType.json | 22 + .../scanner/Regress-1.0.json/Regress.FooError.json | 22 + .../Regress-1.0.json/Regress.FooEventAny.json | 14 + .../Regress-1.0.json/Regress.FooEventExpose.json | 19 + .../Regress-1.0.json/Regress.FooForeignStruct.json | 34 + .../Regress.FooInterfaceIface.json | 19 + .../Regress-1.0.json/Regress.FooObject.json | 315 +++++ .../Regress-1.0.json/Regress.FooObjectClass.json | 29 + .../Regress-1.0.json/Regress.FooOtherObject.json | 10 + .../Regress.FooOtherObjectClass.json | 8 + .../Regress-1.0.json/Regress.FooRectangle.json | 80 ++ .../Regress-1.0.json/Regress.FooSkippable.json | 17 + .../Regress-1.0.json/Regress.FooStackLayer.json | 52 + .../Regress-1.0.json/Regress.FooStruct.json | 19 + .../Regress-1.0.json/Regress.FooStructPrivate.json | 8 + .../Regress.FooSubInterfaceIface.json | 29 + .../Regress-1.0.json/Regress.FooSubobject.json | 20 + .../Regress.FooSubobjectClass.json | 14 + .../Regress.FooThingWithArray.json | 29 + .../Regress-1.0.json/Regress.FooUtilityStruct.json | 14 + tests/scanner/Regress-1.0.json/Regress.Intset.json | 8 + .../Regress.LikeGnomeKeyringPasswordSchema.json | 24 + .../Regress.LikeXklConfigItem.json | 31 + .../Regress-1.0.json/Regress.SkippedStructure.json | 19 + .../Regress-1.0.json/Regress.TestABCError.json | 22 + .../Regress-1.0.json/Regress.TestBoxed.json | 123 ++ .../Regress-1.0.json/Regress.TestBoxedB.json | 52 + .../Regress-1.0.json/Regress.TestBoxedC.json | 29 + .../Regress-1.0.json/Regress.TestBoxedD.json | 59 + .../Regress-1.0.json/Regress.TestBoxedPrivate.json | 8 + .../Regress-1.0.json/Regress.TestDEFError.json | 22 + .../scanner/Regress-1.0.json/Regress.TestEnum.json | 27 + .../Regress-1.0.json/Regress.TestEnumNoGEnum.json | 22 + .../Regress-1.0.json/Regress.TestEnumUnsigned.json | 17 + .../Regress-1.0.json/Regress.TestError.json | 22 + .../Regress-1.0.json/Regress.TestFloating.json | 20 + .../Regress.TestFloatingClass.json | 14 + .../Regress.TestFundamentalObject.json | 48 + .../Regress.TestFundamentalObjectClass.json | 24 + .../Regress.TestFundamentalSubObject.json | 27 + .../Regress.TestFundamentalSubObjectClass.json | 14 + .../Regress.TestInheritDrawable.json | 87 ++ .../Regress.TestInheritDrawableClass.json | 14 + .../Regress.TestInheritPixmapObjectClass.json | 14 + .../Regress.TestInterfaceIface.json | 14 + .../scanner/Regress-1.0.json/Regress.TestObj.json | 866 +++++++++++++ .../Regress-1.0.json/Regress.TestObjClass.json | 49 + .../Regress-1.0.json/Regress.TestOtherError.json | 22 + .../Regress.TestPrivateStruct.json | 24 + .../Regress.TestReferenceEnum.json | 37 + .../Regress-1.0.json/Regress.TestSimpleBoxedA.json | 64 + .../Regress-1.0.json/Regress.TestSimpleBoxedB.json | 29 + .../Regress-1.0.json/Regress.TestStructA.json | 68 + .../Regress-1.0.json/Regress.TestStructB.json | 36 + .../Regress-1.0.json/Regress.TestStructC.json | 19 + .../Regress-1.0.json/Regress.TestStructD.json | 34 + .../Regress-1.0.json/Regress.TestStructE.json | 19 + .../Regress-1.0.json/Regress.TestStructF.json | 44 + .../Regress.TestStructFixedArray.json | 29 + .../Regress-1.0.json/Regress.TestSubObj.json | 39 + .../Regress-1.0.json/Regress.TestSubObjClass.json | 14 + .../Regress-1.0.json/Regress.TestWi8021x.json | 69 + .../Regress-1.0.json/Regress.TestWi8021xClass.json | 14 + 162 files changed, 10709 insertions(+), 10 deletions(-) create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress-1.0.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.ATestError.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.AnAnonymousUnion.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.AnnotationFields.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.AnnotationObject.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.AnnotationObjectClass.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.AnnotationStruct.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooASingle.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooAddressType.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooBRect.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooBoxed.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooBuffer.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooBufferClass.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooDBusData.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooEnumFullname.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooEnumNoType.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooEnumType.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooError.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooEventAny.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooEventExpose.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooForeignStruct.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooInterfaceIface.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooObject.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooObjectClass.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooOtherObject.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooOtherObjectClass.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooRectangle.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooSkippable.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooStackLayer.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooStruct.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooStructPrivate.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooSubInterfaceIface.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooSubobject.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooSubobjectClass.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooThingWithArray.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.FooUtilityStruct.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.Intset.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.LikeGnomeKeyringPasswordSchema.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.LikeXklConfigItem.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.SkippedStructure.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestABCError.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestBoxed.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestBoxedB.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestBoxedC.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestBoxedD.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestBoxedPrivate.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestDEFError.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestEnum.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestEnumNoGEnum.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestEnumUnsigned.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestError.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestFloating.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestFloatingClass.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestFundamentalObject.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestFundamentalObjectClass.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestFundamentalSubObject.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestFundamentalSubObjectClass.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestInheritDrawable.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestInheritDrawableClass.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestInheritPixmapObjectClass.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestInterfaceIface.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestObj.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestObjClass.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestOtherError.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestPrivateStruct.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestReferenceEnum.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestSimpleBoxedA.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestSimpleBoxedB.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestStructA.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestStructB.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestStructC.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestStructD.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestStructE.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestStructF.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestStructFixedArray.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestSubObj.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestSubObjClass.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestWi8021x.json create mode 100644 tests/scanner/Regress-1.0-expected.json/Regress.TestWi8021xClass.json create mode 100644 tests/scanner/Regress-1.0.json/Regress-1.0.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.ATestError.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.AnAnonymousUnion.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.AnnotationFields.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.AnnotationObject.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.AnnotationObjectClass.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.AnnotationStruct.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooASingle.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooAddressType.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooBRect.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooBoxed.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooBuffer.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooBufferClass.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooDBusData.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooEnumFullname.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooEnumNoType.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooEnumType.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooError.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooEventAny.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooEventExpose.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooForeignStruct.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooInterfaceIface.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooObject.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooObjectClass.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooOtherObject.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooOtherObjectClass.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooRectangle.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooSkippable.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooStackLayer.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooStruct.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooStructPrivate.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooSubInterfaceIface.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooSubobject.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooSubobjectClass.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooThingWithArray.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.FooUtilityStruct.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.Intset.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.LikeGnomeKeyringPasswordSchema.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.LikeXklConfigItem.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.SkippedStructure.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestABCError.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestBoxed.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestBoxedB.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestBoxedC.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestBoxedD.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestBoxedPrivate.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestDEFError.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestEnum.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestEnumNoGEnum.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestEnumUnsigned.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestError.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestFloating.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestFloatingClass.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestFundamentalObject.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestFundamentalObjectClass.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestFundamentalSubObject.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestFundamentalSubObjectClass.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestInheritDrawable.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestInheritDrawableClass.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestInheritPixmapObjectClass.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestInterfaceIface.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestObj.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestObjClass.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestOtherError.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestPrivateStruct.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestReferenceEnum.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestSimpleBoxedA.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestSimpleBoxedB.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestStructA.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestStructB.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestStructC.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestStructD.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestStructE.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestStructF.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestStructFixedArray.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestSubObj.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestSubObjClass.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestWi8021x.json create mode 100644 tests/scanner/Regress-1.0.json/Regress.TestWi8021xClass.json diff --git a/giscanner/docmain.py b/giscanner/docmain.py index e65b57a0..7750b3bd 100644 --- a/giscanner/docmain.py +++ b/giscanner/docmain.py @@ -42,6 +42,9 @@ def doc_main(args): parser.add_option("", "--write-sections-file", action="store_true", dest="write_sections", help="Generate and write out a sections file") + parser.add_option("", "--write-json-files", + action="store_true", dest="write_json", + help="Generate and write out json files describing the API") options, args = parser.parse_args(args) if not options.output: @@ -65,6 +68,9 @@ def doc_main(args): fp = open(options.output, 'w') write_sections_file(fp, sections_file) fp.close() + elif options.write_json: + writer = DocWriter(transformer, options.language) + writer.write_json(options.output) else: writer = DocWriter(transformer, options.language) writer.write(options.output) diff --git a/giscanner/docwriter.py b/giscanner/docwriter.py index 49cdb8e2..90e12b27 100644 --- a/giscanner/docwriter.py +++ b/giscanner/docwriter.py @@ -27,6 +27,7 @@ import tempfile from xml.sax import saxutils from mako.lookup import TemplateLookup +import json import markdown from . import ast, xmlwriter @@ -178,6 +179,9 @@ class DocFormatter(object): self._transformer = transformer self._scanner = DocstringScanner() + #FIXME: We should put the json functionality in its own subclass + self.json = False + def escape(self, text): return saxutils.escape(text) @@ -347,10 +351,23 @@ class DocFormatter(object): else: return make_page_id(node) + def _write_xref_tag(self, target, attrdict, data=None, internal=True): + if self.json: + tag = 'span' + attribute_name = 'data-xref' + else: + tag = 'link' + if internal: + attribute_name = 'xref' + else: + attribute_name = 'href' + + attrs = [(attribute_name, target)] + attrdict.items() + return xmlwriter.build_xml_tag(tag, attrs, data) + def format_xref(self, node, **attrdict): if node is None or not hasattr(node, 'namespace'): - attrs = [('xref', 'index')] + attrdict.items() - return xmlwriter.build_xml_tag('link', attrs) + return self._write_xref_tag('index', attrdict) elif isinstance(node, ast.Member): # Enum/BitField members are linked to the main enum page. return self.format_xref(node.parent, **attrdict) + '.' + node.name @@ -360,15 +377,12 @@ class DocFormatter(object): return self.format_external_xref(node, attrdict) def format_internal_xref(self, node, attrdict): - attrs = [('xref', make_page_id(node))] + attrdict.items() - return xmlwriter.build_xml_tag('link', attrs) + return self._write_xref_tag(make_page_id(node), attrdict) def format_external_xref(self, node, attrdict): ns = node.namespace - attrs = [('href', '../%s-%s/%s.html' % (ns.name, str(ns.version), - make_page_id(node)))] - attrs += attrdict.items() - return xmlwriter.build_xml_tag('link', attrs, self.format_page_name(node)) + target = '../%s-%s/%s.html' % (ns.name, str(ns.version), make_page_id(node)) + return self._write_xref_tag(target, attrdict, self.format_page_name(node), internal=False) def field_is_writable(self, field): return True @@ -917,6 +931,165 @@ class DocWriter(object): self._walk_node(output, self._transformer.namespace, []) self._transformer.namespace.walk(lambda node, chain: self._walk_node(output, node, chain)) + def _node_to_json(self, node): + node_dict = {} + node_dict['name'] = node.name + node_dict['kind'] = get_node_kind(node) + node_dict['doc'] = self._formatter.format(node, node.doc) + return node_dict + + def _parameter_to_json(self, node): + node_dict = {} + node_dict['argname'] = node.argname + node_dict['direction'] = node.direction + node_dict['allow_none'] = node.allow_none + node_dict['type'] = self._formatter.format_type(node.type) + + return node_dict + + def _parameters_to_json(self, parameters): + parameter_dicts = [] + for parameter in parameters: + parameter_dicts.append(self._parameter_to_json(parameter)) + return parameter_dicts + + def _return_to_json(self, node): + node_dict = {} + node_dict['type'] = self._formatter.format_type(node.type) + + return node_dict + + def _callable_to_json(self, node): + node_dict = self._node_to_json(node) + node_dict['retval'] = self._return_to_json(node.retval) + node_dict['parameters'] = self._parameters_to_json(node.parameters) + + return node_dict + + def _callables_to_json(self, callables): + callable_dicts = [] + for callable in callables: + callable_dicts.append(self._callable_to_json(callable)) + return callable_dicts + + def _property_to_json(self, node): + node_dict = self._node_to_json(node) + node_dict['type'] = self._formatter.format_type(node.type) + + return node_dict + + def _properties_to_json(self, properties): + property_dicts = [] + for prop in properties: + if not isinstance(prop.type, ast.TypeUnknown): + property_dicts.append(self._property_to_json(prop)) + return property_dicts + + def _vfuncs_to_json(self, vfuncs): + vfunc_dicts = [] + for vfunc in vfuncs: + vfunc_dicts.append(self._node_to_json(vfunc)) + return vfunc_dicts + + def _fields_to_json(self, fields): + field_dicts = [] + for field in fields: + field_dicts.append(self._node_to_json(field)) + return field_dicts + + def _compound_to_json(self, node): + node_dict = self._node_to_json(node) + node_dict['constructors'] = self._callables_to_json(node.constructors) + node_dict['methods'] = self._callables_to_json(node.methods) + node_dict['methods'].extend(self._callables_to_json(node.static_methods)) + + return node_dict + + def _class_to_json(self, node): + node_dict = self._compound_to_json(node) + node_dict['properties'] = self._properties_to_json(node.properties) + node_dict['signals'] = self._callables_to_json(node.signals) + node_dict['vfuncs'] = self._callables_to_json(node.virtual_methods) + + return node_dict + + def _record_to_json(self, node): + node_dict = self._compound_to_json(node) + node_dict['fields'] = self._fields_to_json(node.fields) + + return node_dict + + def _members_to_json(self, members): + member_dicts = [] + for member in members: + member_dicts.append(self._node_to_json(member)) + return member_dicts + + def _enum_to_json(self, node): + node_dict = self._node_to_json(node) + node_dict['members'] = self._members_to_json(node.members) + + return node_dict + + def _namespace_to_json(self, namespace): + classes = [] + records = [] + functions = [] + enums = [] + for node in namespace.itervalues(): + if isinstance(node, ast.Class): + classes.append(self._node_to_json(node)) + elif isinstance(node, ast.Record): + records.append(self._node_to_json(node)) + elif isinstance(node, ast.Function): + functions.append(self._node_to_json(node)) + elif isinstance(node, ast.Enum): + enums.append(self._node_to_json(node)) + + top_level_dict = {} + top_level_dict['name'] = namespace.name + top_level_dict['version'] = namespace.version + top_level_dict['classes'] = classes + top_level_dict['records'] = records + top_level_dict['functions'] = functions + top_level_dict['enums'] = enums + + return top_level_dict + + def _dump_json(self, node_dict, output_file_name): + fp = open(output_file_name, 'w') + json.dump(node_dict, fp, sort_keys=True, indent=4, + separators=(',', ': ')) + fp.close() + + def write_json(self, output): + try: + os.makedirs(output) + except OSError: + # directory already made + pass + + self._formatter.json = True + + namespace = self._transformer.namespace + for node in namespace.itervalues(): + if isinstance(node, ast.Class): + node_dict = self._class_to_json(node) + elif isinstance(node, ast.Record): + node_dict = self._record_to_json(node) + elif isinstance(node, ast.Enum): + node_dict = self._enum_to_json(node) + else: + continue + + output_file_name = os.path.join(os.path.abspath(output), + '%s.%s.json' % (namespace.name, node.name)) + self._dump_json(node_dict, output_file_name) + + output_file_name = os.path.join(os.path.abspath(output), + '%s-%s.json' % (namespace.name, namespace.version)) + self._dump_json(self._namespace_to_json(namespace), output_file_name) + def _walk_node(self, output, node, chain): if isinstance(node, ast.Function) and node.moved_to is not None: return False diff --git a/tests/gi-tester b/tests/gi-tester index 51199dde..963634a1 100755 --- a/tests/gi-tester +++ b/tests/gi-tester @@ -34,6 +34,10 @@ case $targetname in diff -u -w -B -U 10 ${srcdir}/${targetname::-4}-expected.txt ${builddir}/${targetname} exit $? ;; +*.json) + diff -r -u -w -B -U 10 ${srcdir}/${targetname::-5}-expected.json ${builddir}/${targetbase} + exit $? + ;; *.py) if [[ -z "${TESTARGS}" ]]; then # Run as regular Python file if TESTARGS is empty diff --git a/tests/scanner/Makefile.am b/tests/scanner/Makefile.am index f697b4b4..4da80419 100644 --- a/tests/scanner/Makefile.am +++ b/tests/scanner/Makefile.am @@ -167,9 +167,9 @@ Headeronly-1.0.gir: headeronly.h if BUILD_DOCTOOL DOCGIRS = Regress-1.0.gir -CHECKDOCS = $(DOCGIRS:.gir=-C) $(DOCGIRS:.gir=-Python) $(DOCGIRS:.gir=-Gjs) $(DOCGIRS:.gir=-sections.txt) +CHECKDOCS = $(DOCGIRS:.gir=-C) $(DOCGIRS:.gir=-Python) $(DOCGIRS:.gir=-Gjs) $(DOCGIRS:.gir=-sections.txt) $(DOCGIRS:.gir=.json) MALLARD_DIRS = $(DOCGIRS:.gir=-C) $(DOCGIRS:.gir=-Python) $(DOCGIRS:.gir=-Gjs) -MALLARD_CLEAN = $(DOCGIRS:.gir=-C)/* $(DOCGIRS:.gir=-Python)/* $(DOCGIRS:.gir=-Gjs)/* $(DOCGIRS:.gir=-sections.txt) +MALLARD_CLEAN = $(DOCGIRS:.gir=-C)/* $(DOCGIRS:.gir=-Python)/* $(DOCGIRS:.gir=-Gjs)/* $(DOCGIRS:.gir=-sections.txt) $(DOCGIRS:.gir=.json)/* EXPECTED_MALLARD_DIRS = $(MALLARD_DIRS:=-expected) CLEANFILES += $(MALLARD_CLEAN) @@ -188,6 +188,9 @@ CLEANFILES += $(MALLARD_CLEAN) %-sections.txt: %.gir $(AM_V_GEN)$(INTROSPECTION_DOCTOOL) $(INTROSPECTION_DOCTOOL_ARGS) --write-sections-file $*.gir -o $@ +%.json: %.gir + $(AM_V_GEN)$(INTROSPECTION_DOCTOOL) $(INTROSPECTION_DOCTOOL_ARGS) --write-json-files $*.gir -o $@ + else CHECKDOCS = endif @@ -207,4 +210,5 @@ EXTRA_DIST += \ Regress-1.0-Gjs-expected \ Regress-1.0-Python-expected \ Regress-1.0-sections-expected.txt \ + Regress-1.0.json \ $(NULL) diff --git a/tests/scanner/Regress-1.0-expected.json/Regress-1.0.json b/tests/scanner/Regress-1.0-expected.json/Regress-1.0.json new file mode 100644 index 00000000..39cb003d --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress-1.0.json @@ -0,0 +1,1352 @@ +{ + "classes": [ + { + "doc": "

This is an object used to test annotations.

", + "kind": "class", + "name": "AnnotationObject" + }, + { + "doc": "", + "kind": "class", + "name": "FooBuffer" + }, + { + "doc": "", + "kind": "class", + "name": "FooObject" + }, + { + "doc": "", + "kind": "class", + "name": "FooOtherObject" + }, + { + "doc": "", + "kind": "class", + "name": "FooSubobject" + }, + { + "doc": "", + "kind": "class", + "name": "TestFloating" + }, + { + "doc": "", + "kind": "class", + "name": "TestFundamentalObject" + }, + { + "doc": "", + "kind": "class", + "name": "TestFundamentalSubObject" + }, + { + "doc": "", + "kind": "class", + "name": "TestInheritDrawable" + }, + { + "doc": "", + "kind": "class", + "name": "TestObj" + }, + { + "doc": "", + "kind": "class", + "name": "TestSubObj" + }, + { + "doc": "", + "kind": "class", + "name": "TestWi8021x" + } + ], + "enums": [ + { + "doc": "", + "kind": "enum", + "name": "ATestError" + }, + { + "doc": "", + "kind": "enum", + "name": "FooASingle" + }, + { + "doc": "", + "kind": "enum", + "name": "FooAddressType" + }, + { + "doc": "", + "kind": "enum", + "name": "FooEnumFullname" + }, + { + "doc": "", + "kind": "enum", + "name": "FooEnumNoType" + }, + { + "doc": "", + "kind": "enum", + "name": "FooEnumType" + }, + { + "doc": "", + "kind": "enum", + "name": "FooError" + }, + { + "doc": "

Some type that is only interesting from C and should not be\nexposed to language bindings.

", + "kind": "enum", + "name": "FooSkippable" + }, + { + "doc": "", + "kind": "enum", + "name": "FooStackLayer" + }, + { + "doc": "", + "kind": "enum", + "name": "TestABCError" + }, + { + "doc": "", + "kind": "enum", + "name": "TestDEFError" + }, + { + "doc": "

By purpose, not all members have documentation

", + "kind": "enum", + "name": "TestEnum" + }, + { + "doc": "", + "kind": "enum", + "name": "TestEnumNoGEnum" + }, + { + "doc": "", + "kind": "enum", + "name": "TestEnumUnsigned" + }, + { + "doc": "", + "kind": "enum", + "name": "TestError" + }, + { + "doc": "", + "kind": "enum", + "name": "TestOtherError" + }, + { + "doc": "", + "kind": "enum", + "name": "TestReferenceEnum" + } + ], + "functions": [ + { + "doc": "", + "kind": "function", + "name": "aliased_caller_alloc" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_attribute_func" + }, + { + "doc": "

Test messing up the heuristic of closure/destroy-notification\ndetection, and fixing it via annotations.

", + "kind": "function", + "name": "annotation_custom_destroy" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_get_source_file" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_init" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_invalid_regress_annotation" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_ptr_array" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_return_array" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_return_filename" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_set_source_file" + }, + { + "doc": "

Explicitly test having a space after the ** here.

", + "kind": "function", + "name": "annotation_space_after_comment_bug631690" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_string_array_length" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_string_zero_terminated" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_string_zero_terminated_out" + }, + { + "doc": "

See https://bugzilla.gnome.org/show_bug.cgi?id=630862

", + "kind": "function", + "name": "annotation_test_parsing_bug630862" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_transfer_floating" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_versioned" + }, + { + "doc": "", + "kind": "function", + "name": "atest_error_quark" + }, + { + "doc": "", + "kind": "function", + "name": "foo_async_ready_callback" + }, + { + "doc": "", + "kind": "function", + "name": "foo_destroy_notify_callback" + }, + { + "doc": "", + "kind": "function", + "name": "foo_enum_type_method" + }, + { + "doc": "", + "kind": "function", + "name": "foo_enum_type_returnv" + }, + { + "doc": "", + "kind": "function", + "name": "foo_error_quark" + }, + { + "doc": "", + "kind": "function", + "name": "foo_init" + }, + { + "doc": "", + "kind": "function", + "name": "foo_interface_static_method" + }, + { + "doc": "", + "kind": "function", + "name": "foo_method_external_references" + }, + { + "doc": "

This should be scanned as a top-level function, and shouldn't cause\na \"Can't find matching type for constructor\" warning.

", + "kind": "function", + "name": "foo_not_a_constructor_new" + }, + { + "doc": "

This is a C convenience constructor; we have to (skip)\nit because it's not a boxed type.

", + "kind": "function", + "name": "foo_rectangle_new" + }, + { + "doc": "

Does something that's only interesting from C and should not be\nexposed to language bindings.

", + "kind": "function", + "name": "foo_skip_me" + }, + { + "doc": "", + "kind": "function", + "name": "foo_some_variant" + }, + { + "doc": "", + "kind": "function", + "name": "foo_some_variant_ptr" + }, + { + "doc": "", + "kind": "function", + "name": "foo_test_array" + }, + { + "doc": "", + "kind": "function", + "name": "foo_test_const_char_param" + }, + { + "doc": "", + "kind": "function", + "name": "foo_test_const_char_retval" + }, + { + "doc": "", + "kind": "function", + "name": "foo_test_const_struct_param" + }, + { + "doc": "", + "kind": "function", + "name": "foo_test_const_struct_retval" + }, + { + "doc": "", + "kind": "function", + "name": "foo_test_string_array" + }, + { + "doc": "", + "kind": "function", + "name": "foo_test_string_array_with_g" + }, + { + "doc": "", + "kind": "function", + "name": "foo_test_unsigned_qualifier" + }, + { + "doc": "", + "kind": "function", + "name": "foo_test_unsigned_type" + }, + { + "doc": "", + "kind": "function", + "name": "foo_test_varargs_callback" + }, + { + "doc": "", + "kind": "function", + "name": "foo_test_varargs_callback2" + }, + { + "doc": "", + "kind": "function", + "name": "foo_test_varargs_callback3" + }, + { + "doc": "", + "kind": "function", + "name": "func_obj_null_in" + }, + { + "doc": "", + "kind": "function", + "name": "global_get_flags_out" + }, + { + "doc": "

This test case mirrors GnomeKeyringPasswordSchema from\nlibgnome-keyring.

", + "kind": "function", + "name": "has_parameter_named_attrs" + }, + { + "doc": "", + "kind": "function", + "name": "introspectable_via_alias" + }, + { + "doc": "", + "kind": "function", + "name": "not_introspectable_via_alias" + }, + { + "doc": "", + "kind": "function", + "name": "random_function_with_skipped_structure" + }, + { + "doc": "", + "kind": "function", + "name": "set_abort_on_error" + }, + { + "doc": "", + "kind": "function", + "name": "test_abc_error_quark" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_callback" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_fixed_out_objects" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_fixed_size_int_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_fixed_size_int_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_fixed_size_int_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_gint16_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_gint32_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_gint64_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_gint8_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_gtype_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_int_full_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_int_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_int_inout" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_int_none_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_int_null_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_int_null_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_int_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_async_ready_callback" + }, + { + "doc": "", + "kind": "function", + "name": "test_boolean" + }, + { + "doc": "", + "kind": "function", + "name": "test_boolean_false" + }, + { + "doc": "", + "kind": "function", + "name": "test_boolean_true" + }, + { + "doc": "", + "kind": "function", + "name": "test_boxeds_not_a_method" + }, + { + "doc": "", + "kind": "function", + "name": "test_boxeds_not_a_static" + }, + { + "doc": "", + "kind": "function", + "name": "test_cairo_context_full_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_cairo_context_none_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_cairo_surface_full_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_cairo_surface_full_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_cairo_surface_none_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_cairo_surface_none_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_callback" + }, + { + "doc": "", + "kind": "function", + "name": "test_callback_async" + }, + { + "doc": "

Notified - callback persists until a DestroyNotify delegate\nis invoked.

", + "kind": "function", + "name": "test_callback_destroy_notify" + }, + { + "doc": "

Adds a scope notified callback with no user data. This can invoke an error\ncondition in bindings which needs to be tested.

", + "kind": "function", + "name": "test_callback_destroy_notify_no_user_data" + }, + { + "doc": "", + "kind": "function", + "name": "test_callback_thaw_async" + }, + { + "doc": "

Invokes all callbacks installed by #test_callback_destroy_notify(),\nadding up their return values, and removes them, invoking the\ncorresponding destroy notfications.

", + "kind": "function", + "name": "test_callback_thaw_notifications" + }, + { + "doc": "

Call - callback parameter persists for the duration of the method\ncall and can be released on return.

", + "kind": "function", + "name": "test_callback_user_data" + }, + { + "doc": "", + "kind": "function", + "name": "test_closure" + }, + { + "doc": "", + "kind": "function", + "name": "test_closure_one_arg" + }, + { + "doc": "", + "kind": "function", + "name": "test_closure_variant" + }, + { + "doc": "", + "kind": "function", + "name": "test_date_in_gvalue" + }, + { + "doc": "", + "kind": "function", + "name": "test_def_error_quark" + }, + { + "doc": "", + "kind": "function", + "name": "test_double" + }, + { + "doc": "", + "kind": "function", + "name": "test_enum_param" + }, + { + "doc": "", + "kind": "function", + "name": "test_error_quark" + }, + { + "doc": "", + "kind": "function", + "name": "test_filename_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_float" + }, + { + "doc": "", + "kind": "function", + "name": "test_garray_container_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_garray_full_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_gerror_callback" + }, + { + "doc": "", + "kind": "function", + "name": "test_ghash_container_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_ghash_everything_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_ghash_gvalue_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_ghash_gvalue_return" + }, + { + "doc": "

Specify nested parameterized types directly with the (type ) annotation.

", + "kind": "function", + "name": "test_ghash_nested_everything_return" + }, + { + "doc": "

Another way of specifying nested parameterized types: using the\nelement-type annotation.

", + "kind": "function", + "name": "test_ghash_nested_everything_return2" + }, + { + "doc": "", + "kind": "function", + "name": "test_ghash_nothing_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_ghash_nothing_in2" + }, + { + "doc": "", + "kind": "function", + "name": "test_ghash_nothing_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_ghash_nothing_return2" + }, + { + "doc": "", + "kind": "function", + "name": "test_ghash_null_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_ghash_null_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_ghash_null_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_glist_container_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_glist_everything_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_glist_nothing_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_glist_nothing_in2" + }, + { + "doc": "", + "kind": "function", + "name": "test_glist_nothing_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_glist_nothing_return2" + }, + { + "doc": "", + "kind": "function", + "name": "test_glist_null_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_glist_null_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_gslist_container_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_gslist_everything_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_gslist_nothing_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_gslist_nothing_in2" + }, + { + "doc": "", + "kind": "function", + "name": "test_gslist_nothing_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_gslist_nothing_return2" + }, + { + "doc": "", + "kind": "function", + "name": "test_gslist_null_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_gslist_null_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_gtype" + }, + { + "doc": "", + "kind": "function", + "name": "test_gvariant_as" + }, + { + "doc": "", + "kind": "function", + "name": "test_gvariant_asv" + }, + { + "doc": "", + "kind": "function", + "name": "test_gvariant_i" + }, + { + "doc": "", + "kind": "function", + "name": "test_gvariant_s" + }, + { + "doc": "", + "kind": "function", + "name": "test_gvariant_v" + }, + { + "doc": "", + "kind": "function", + "name": "test_hash_table_callback" + }, + { + "doc": "", + "kind": "function", + "name": "test_int" + }, + { + "doc": "", + "kind": "function", + "name": "test_int16" + }, + { + "doc": "", + "kind": "function", + "name": "test_int32" + }, + { + "doc": "", + "kind": "function", + "name": "test_int64" + }, + { + "doc": "", + "kind": "function", + "name": "test_int8" + }, + { + "doc": "", + "kind": "function", + "name": "test_int_out_utf8" + }, + { + "doc": "", + "kind": "function", + "name": "test_int_value_arg" + }, + { + "doc": "", + "kind": "function", + "name": "test_long" + }, + { + "doc": "", + "kind": "function", + "name": "test_multi_callback" + }, + { + "doc": "", + "kind": "function", + "name": "test_multi_double_args" + }, + { + "doc": "

This is a function.

It has multiple lines in the documentation.

The sky is blue.

You will give me your credit card number.

", + "kind": "function", + "name": "test_multiline_doc_comments" + }, + { + "doc": "

<informaltable>\n <tgroup cols=\"3\">\n <thead>\n <row>\n <entry>Syntax</entry>\n <entry>Explanation</entry>\n <entry>Examples</entry>\n </row>\n </thead>\n <tbody>\n <row>\n <entry>rgb(@r, @g, @b)</entry>\n <entry>An opaque color; @r, @g, @b can be either integers between\n 0 and 255 or percentages</entry>\n <entry><literallayout>rgb(128, 10, 54)\nrgb(20%, 30%, 0%)</literallayout></entry>\n </row>\n <row>\n <entry>rgba(@r, @g, @b, a)</entry>\n <entry>A translucent color; @r, @g, @b are as in the previous row,\n a is a floating point number between 0 and 1</entry>\n <entry><literallayout>rgba(255, 255, 0, 0.5)</literallayout></entry>\n </row>\n </tbody>\n </tgroup>\n</informaltable>

What we're testing here is that the scanner ignores the a nested inside XML.

", + "kind": "function", + "name": "test_nested_parameter" + }, + { + "doc": "", + "kind": "function", + "name": "test_null_gerror_callback" + }, + { + "doc": "", + "kind": "function", + "name": "test_owned_gerror_callback" + }, + { + "doc": "", + "kind": "function", + "name": "test_short" + }, + { + "doc": "", + "kind": "function", + "name": "test_simple_boxed_a_const_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_simple_callback" + }, + { + "doc": "", + "kind": "function", + "name": "test_size" + }, + { + "doc": "

Should not emit a warning:\nhttps://bugzilla.gnome.org/show_bug.cgi?id=685399

", + "kind": "function", + "name": "test_skip_unannotated_callback" + }, + { + "doc": "", + "kind": "function", + "name": "test_ssize" + }, + { + "doc": "", + "kind": "function", + "name": "test_struct_a_parse" + }, + { + "doc": "", + "kind": "function", + "name": "test_strv_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_strv_in_gvalue" + }, + { + "doc": "", + "kind": "function", + "name": "test_strv_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_strv_out_c" + }, + { + "doc": "", + "kind": "function", + "name": "test_strv_out_container" + }, + { + "doc": "", + "kind": "function", + "name": "test_strv_outarg" + }, + { + "doc": "", + "kind": "function", + "name": "test_timet" + }, + { + "doc": "", + "kind": "function", + "name": "test_torture_signature_0" + }, + { + "doc": "

This function throws an error if m is odd.

", + "kind": "function", + "name": "test_torture_signature_1" + }, + { + "doc": "", + "kind": "function", + "name": "test_torture_signature_2" + }, + { + "doc": "", + "kind": "function", + "name": "test_uint" + }, + { + "doc": "", + "kind": "function", + "name": "test_uint16" + }, + { + "doc": "", + "kind": "function", + "name": "test_uint32" + }, + { + "doc": "", + "kind": "function", + "name": "test_uint64" + }, + { + "doc": "", + "kind": "function", + "name": "test_uint8" + }, + { + "doc": "", + "kind": "function", + "name": "test_ulong" + }, + { + "doc": "", + "kind": "function", + "name": "test_unconventional_error_quark" + }, + { + "doc": "", + "kind": "function", + "name": "test_unichar" + }, + { + "doc": "", + "kind": "function", + "name": "test_unsigned_enum_param" + }, + { + "doc": "", + "kind": "function", + "name": "test_ushort" + }, + { + "doc": "", + "kind": "function", + "name": "test_utf8_const_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_utf8_const_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_utf8_inout" + }, + { + "doc": "", + "kind": "function", + "name": "test_utf8_nonconst_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_utf8_null_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_utf8_null_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_utf8_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_utf8_out_nonconst_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_utf8_out_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_value_get_fundamental_object" + }, + { + "doc": "

This is a test of Markdown formatting within a comment.

", + "kind": "function", + "name": "test_value_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_value_set_fundamental_object" + }, + { + "doc": "", + "kind": "function", + "name": "test_versioning" + } + ], + "name": "Regress", + "records": [ + { + "doc": "", + "kind": "class", + "name": "AnAnonymousUnion" + }, + { + "doc": "

This is a struct for testing field documentation and annotations

", + "kind": "class", + "name": "AnnotationFields" + }, + { + "doc": "", + "kind": "class", + "name": "AnnotationObjectClass" + }, + { + "doc": "

This is a test of an array of object in an field of a struct.

", + "kind": "class", + "name": "AnnotationStruct" + }, + { + "doc": "", + "kind": "class", + "name": "FooBRect" + }, + { + "doc": "", + "kind": "class", + "name": "FooBoxed" + }, + { + "doc": "", + "kind": "class", + "name": "FooBufferClass" + }, + { + "doc": "", + "kind": "class", + "name": "FooDBusData" + }, + { + "doc": "", + "kind": "class", + "name": "FooEventAny" + }, + { + "doc": "", + "kind": "class", + "name": "FooEventExpose" + }, + { + "doc": "", + "kind": "class", + "name": "FooForeignStruct" + }, + { + "doc": "", + "kind": "class", + "name": "FooInterfaceIface" + }, + { + "doc": "", + "kind": "class", + "name": "FooObjectClass" + }, + { + "doc": "", + "kind": "class", + "name": "FooOtherObjectClass" + }, + { + "doc": "", + "kind": "class", + "name": "FooRectangle" + }, + { + "doc": "", + "kind": "class", + "name": "FooStruct" + }, + { + "doc": "", + "kind": "class", + "name": "FooStructPrivate" + }, + { + "doc": "", + "kind": "class", + "name": "FooSubInterfaceIface" + }, + { + "doc": "", + "kind": "class", + "name": "FooSubobjectClass" + }, + { + "doc": "", + "kind": "class", + "name": "FooThingWithArray" + }, + { + "doc": "", + "kind": "class", + "name": "FooUtilityStruct" + }, + { + "doc": "

Like telepathy-glib's TpIntset.

", + "kind": "class", + "name": "Intset" + }, + { + "doc": "", + "kind": "class", + "name": "LikeGnomeKeyringPasswordSchema" + }, + { + "doc": "", + "kind": "class", + "name": "LikeXklConfigItem" + }, + { + "doc": "

This should be skipped, and moreover, all function which\nuse it should be.

", + "kind": "class", + "name": "SkippedStructure" + }, + { + "doc": "", + "kind": "class", + "name": "TestBoxed" + }, + { + "doc": "", + "kind": "class", + "name": "TestBoxedB" + }, + { + "doc": "", + "kind": "class", + "name": "TestBoxedC" + }, + { + "doc": "", + "kind": "class", + "name": "TestBoxedD" + }, + { + "doc": "", + "kind": "class", + "name": "TestBoxedPrivate" + }, + { + "doc": "", + "kind": "class", + "name": "TestFloatingClass" + }, + { + "doc": "", + "kind": "class", + "name": "TestFundamentalObjectClass" + }, + { + "doc": "", + "kind": "class", + "name": "TestFundamentalSubObjectClass" + }, + { + "doc": "", + "kind": "class", + "name": "TestInheritDrawableClass" + }, + { + "doc": "", + "kind": "class", + "name": "TestInheritPixmapObjectClass" + }, + { + "doc": "", + "kind": "class", + "name": "TestInterfaceIface" + }, + { + "doc": "", + "kind": "class", + "name": "TestObjClass" + }, + { + "doc": "", + "kind": "class", + "name": "TestPrivateStruct" + }, + { + "doc": "", + "kind": "class", + "name": "TestSimpleBoxedA" + }, + { + "doc": "", + "kind": "class", + "name": "TestSimpleBoxedB" + }, + { + "doc": "", + "kind": "class", + "name": "TestStructA" + }, + { + "doc": "", + "kind": "class", + "name": "TestStructB" + }, + { + "doc": "", + "kind": "class", + "name": "TestStructC" + }, + { + "doc": "", + "kind": "class", + "name": "TestStructD" + }, + { + "doc": "", + "kind": "class", + "name": "TestStructE" + }, + { + "doc": "", + "kind": "class", + "name": "TestStructF" + }, + { + "doc": "", + "kind": "class", + "name": "TestStructFixedArray" + }, + { + "doc": "", + "kind": "class", + "name": "TestSubObjClass" + }, + { + "doc": "", + "kind": "class", + "name": "TestWi8021xClass" + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.ATestError.json b/tests/scanner/Regress-1.0-expected.json/Regress.ATestError.json new file mode 100644 index 00000000..d1b5678c --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.ATestError.json @@ -0,0 +1,22 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "code0" + }, + { + "doc": "", + "kind": "default", + "name": "code1" + }, + { + "doc": "", + "kind": "default", + "name": "code2" + } + ], + "name": "ATestError" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.AnAnonymousUnion.json b/tests/scanner/Regress-1.0-expected.json/Regress.AnAnonymousUnion.json new file mode 100644 index 00000000..9e4b2174 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.AnAnonymousUnion.json @@ -0,0 +1,19 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "x" + }, + { + "doc": "", + "kind": "field", + "name": null + } + ], + "kind": "class", + "methods": [], + "name": "AnAnonymousUnion" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.AnnotationFields.json b/tests/scanner/Regress-1.0-expected.json/Regress.AnnotationFields.json new file mode 100644 index 00000000..ee054269 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.AnnotationFields.json @@ -0,0 +1,24 @@ +{ + "constructors": [], + "doc": "

This is a struct for testing field documentation and annotations

", + "fields": [ + { + "doc": "

Some documentation

", + "kind": "field", + "name": "field1" + }, + { + "doc": "

an array of length @len

", + "kind": "field", + "name": "arr" + }, + { + "doc": "

the length of array

", + "kind": "field", + "name": "len" + } + ], + "kind": "class", + "methods": [], + "name": "AnnotationFields" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.AnnotationObject.json b/tests/scanner/Regress-1.0-expected.json/Regress.AnnotationObject.json new file mode 100644 index 00000000..ba50c24f --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.AnnotationObject.json @@ -0,0 +1,584 @@ +{ + "constructors": [], + "doc": "

This is an object used to test annotations.

", + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "allow_none", + "parameters": [ + { + "allow_none": true, + "argname": "somearg", + "direction": "in", + "type": "const gchar*" + } + ], + "retval": { + "type": "GObject*" + } + }, + { + "doc": "

This is a test for out arguments; GObject defaults to transfer

", + "kind": "method", + "name": "calleeowns", + "parameters": [ + { + "allow_none": false, + "argname": "toown", + "direction": "out", + "type": "GObject**" + } + ], + "retval": { + "type": "gint" + } + }, + { + "doc": "

This is a test for out arguments, one transferred, other not

", + "kind": "method", + "name": "calleesowns", + "parameters": [ + { + "allow_none": false, + "argname": "toown1", + "direction": "out", + "type": "GObject**" + }, + { + "allow_none": false, + "argname": "toown2", + "direction": "out", + "type": "GObject**" + } + ], + "retval": { + "type": "gint" + } + }, + { + "doc": "

Test taking a zero-terminated array

", + "kind": "method", + "name": "compute_sum", + "parameters": [ + { + "allow_none": false, + "argname": "nums", + "direction": "in", + "type": "int*" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

Test taking an array with length parameter

", + "kind": "method", + "name": "compute_sum_n", + "parameters": [ + { + "allow_none": false, + "argname": "nums", + "direction": "in", + "type": "int*" + }, + { + "allow_none": false, + "argname": "n_nums", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

Test taking a zero-terminated array with length parameter

", + "kind": "method", + "name": "compute_sum_nz", + "parameters": [ + { + "allow_none": false, + "argname": "nums", + "direction": "in", + "type": "int*" + }, + { + "allow_none": false, + "argname": "n_nums", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

Test returning a caller-owned object

", + "kind": "method", + "name": "create_object", + "parameters": [], + "retval": { + "type": "GObject*" + } + }, + { + "doc": "", + "kind": "method", + "name": "do_not_use", + "parameters": [], + "retval": { + "type": "GObject*" + } + }, + { + "doc": "", + "kind": "method", + "name": "extra_annos", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "

Test taking a call-scoped callback

", + "kind": "method", + "name": "foreach", + "parameters": [ + { + "allow_none": false, + "argname": "func", + "direction": "in", + "type": "RegressAnnotationForeachFunc" + }, + { + "allow_none": false, + "argname": "user_data", + "direction": "in", + "type": "gpointer" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

This is a test for returning a hash table mapping strings to\nobjects.

", + "kind": "method", + "name": "get_hash", + "parameters": [], + "retval": { + "type": "GHashTable*" + } + }, + { + "doc": "

This is a test for returning a list of objects.\nThe list itself should be freed, but not the internal objects,\nintentionally similar example to gtk_container_get_children

", + "kind": "method", + "name": "get_objects", + "parameters": [], + "retval": { + "type": "GSList*" + } + }, + { + "doc": "

This is a test for returning a list of strings, where\neach string needs to be freed.

", + "kind": "method", + "name": "get_strings", + "parameters": [], + "retval": { + "type": "GList*" + } + }, + { + "doc": "", + "kind": "method", + "name": "hidden_self", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "

This is a test for in arguments

", + "kind": "method", + "name": "in", + "parameters": [ + { + "allow_none": false, + "argname": "inarg", + "direction": "in", + "type": "int*" + } + ], + "retval": { + "type": "gint" + } + }, + { + "doc": "

This is a test for out arguments

", + "kind": "method", + "name": "inout", + "parameters": [ + { + "allow_none": false, + "argname": "inoutarg", + "direction": "inout", + "type": "int*" + } + ], + "retval": { + "type": "gint" + } + }, + { + "doc": "

This is a second test for out arguments

", + "kind": "method", + "name": "inout2", + "parameters": [ + { + "allow_none": false, + "argname": "inoutarg", + "direction": "inout", + "type": "int*" + } + ], + "retval": { + "type": "gint" + } + }, + { + "doc": "

This is a 3th test for out arguments

", + "kind": "method", + "name": "inout3", + "parameters": [ + { + "allow_none": true, + "argname": "inoutarg", + "direction": "inout", + "type": "int*" + } + ], + "retval": { + "type": "gint" + } + }, + { + "doc": "", + "kind": "method", + "name": "method", + "parameters": [], + "retval": { + "type": "gint" + } + }, + { + "doc": "", + "kind": "method", + "name": "notrans", + "parameters": [], + "retval": { + "type": "GObject*" + } + }, + { + "doc": "

This is a test for out arguments

", + "kind": "method", + "name": "out", + "parameters": [ + { + "allow_none": false, + "argname": "outarg", + "direction": "out", + "type": "int*" + } + ], + "retval": { + "type": "gint" + } + }, + { + "doc": "

Test taking a zero-terminated array with length parameter

", + "kind": "method", + "name": "parse_args", + "parameters": [ + { + "allow_none": false, + "argname": "argc", + "direction": "inout", + "type": "int*" + }, + { + "allow_none": false, + "argname": "argv", + "direction": "inout", + "type": "char***" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

Test taking a guchar * with a length.

", + "kind": "method", + "name": "set_data", + "parameters": [ + { + "allow_none": false, + "argname": "data", + "direction": "in", + "type": "guchar*" + }, + { + "allow_none": false, + "argname": "length", + "direction": "in", + "type": "gsize" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

Test taking a gchar * with a length.

", + "kind": "method", + "name": "set_data2", + "parameters": [ + { + "allow_none": false, + "argname": "data", + "direction": "in", + "type": "gint8*" + }, + { + "allow_none": false, + "argname": "length", + "direction": "in", + "type": "gsize" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

Test taking a gchar * with a length, overriding the array element\ntype.

", + "kind": "method", + "name": "set_data3", + "parameters": [ + { + "allow_none": false, + "argname": "data", + "direction": "in", + "type": "guint8*" + }, + { + "allow_none": false, + "argname": "length", + "direction": "in", + "type": "gsize" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

Test returning a string as an out parameter

", + "kind": "method", + "name": "string_out", + "parameters": [ + { + "allow_none": false, + "argname": "str_out", + "direction": "out", + "type": "char**" + } + ], + "retval": { + "type": "gboolean" + } + }, + { + "doc": "", + "kind": "method", + "name": "use_buffer", + "parameters": [ + { + "allow_none": false, + "argname": "bytes", + "direction": "in", + "type": "guchar*" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

This is here just for the sake of being overriden by its\n.

", + "kind": "method", + "name": "watch", + "parameters": [ + { + "allow_none": false, + "argname": "func", + "direction": "in", + "type": "RegressAnnotationForeachFunc" + }, + { + "allow_none": false, + "argname": "user_data", + "direction": "in", + "type": "gpointer" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

Test overriding via the \"Rename To\" annotation.

", + "kind": "method", + "name": "watch_full", + "parameters": [ + { + "allow_none": false, + "argname": "func", + "direction": "in", + "type": "RegressAnnotationForeachFunc" + }, + { + "allow_none": false, + "argname": "user_data", + "direction": "in", + "type": "gpointer" + }, + { + "allow_none": false, + "argname": "destroy", + "direction": "in", + "type": "GDestroyNotify" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "with_voidp", + "parameters": [ + { + "allow_none": false, + "argname": "data", + "direction": "in", + "type": "void*" + } + ], + "retval": { + "type": "void" + } + } + ], + "name": "AnnotationObject", + "properties": [ + { + "doc": "", + "kind": "property", + "name": "function-property", + "type": "gpointer" + }, + { + "doc": "

This is a property which is a string

", + "kind": "property", + "name": "string-property", + "type": "gchar*" + }, + { + "doc": "

This is a property annotation intentionally indented with a mix\nof tabs and strings to test the tab handling capabilities of the scanner.

", + "kind": "property", + "name": "tab-property", + "type": "gchar*" + } + ], + "signals": [ + { + "doc": "

This signal tests a signal with attributes.

", + "kind": "signal", + "name": "attribute-signal", + "parameters": [ + { + "allow_none": false, + "argname": "arg1", + "direction": "in", + "type": "gchar*" + }, + { + "allow_none": false, + "argname": "arg2", + "direction": "in", + "type": "gchar*" + } + ], + "retval": { + "type": "gchar*" + } + }, + { + "doc": "

This signal tests an empty document argument (arg1)

", + "kind": "signal", + "name": "doc-empty-arg-parsing", + "parameters": [ + { + "allow_none": false, + "argname": "arg1", + "direction": "in", + "type": "gpointer" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

This is a signal which takes a list of strings, but it's not\nknown by GObject as it's only marked as G_TYPE_POINTER

", + "kind": "signal", + "name": "list-signal", + "parameters": [ + { + "allow_none": false, + "argname": "list", + "direction": "in", + "type": "gpointer" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

This is a signal which has a broken signal handler,\nit says it's pointer but it's actually a string.

", + "kind": "signal", + "name": "string-signal", + "parameters": [ + { + "allow_none": false, + "argname": "string", + "direction": "in", + "type": "gpointer" + } + ], + "retval": { + "type": "void" + } + } + ], + "vfuncs": [] +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.AnnotationObjectClass.json b/tests/scanner/Regress-1.0-expected.json/Regress.AnnotationObjectClass.json new file mode 100644 index 00000000..bae95eb7 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.AnnotationObjectClass.json @@ -0,0 +1,14 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "parent_class" + } + ], + "kind": "class", + "methods": [], + "name": "AnnotationObjectClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.AnnotationStruct.json b/tests/scanner/Regress-1.0-expected.json/Regress.AnnotationStruct.json new file mode 100644 index 00000000..d18969f5 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.AnnotationStruct.json @@ -0,0 +1,14 @@ +{ + "constructors": [], + "doc": "

This is a test of an array of object in an field of a struct.

", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "objects" + } + ], + "kind": "class", + "methods": [], + "name": "AnnotationStruct" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooASingle.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooASingle.json new file mode 100644 index 00000000..6b796b01 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooASingle.json @@ -0,0 +1,12 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "foo_some_single_enum" + } + ], + "name": "FooASingle" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooAddressType.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooAddressType.json new file mode 100644 index 00000000..30cc2a55 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooAddressType.json @@ -0,0 +1,22 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "invalid" + }, + { + "doc": "", + "kind": "default", + "name": "ipv4" + }, + { + "doc": "", + "kind": "default", + "name": "ipv6" + } + ], + "name": "FooAddressType" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooBRect.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooBRect.json new file mode 100644 index 00000000..4aab131a --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooBRect.json @@ -0,0 +1,59 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [ + { + "allow_none": false, + "argname": "x", + "direction": "in", + "type": "double" + }, + { + "allow_none": false, + "argname": "y", + "direction": "in", + "type": "double" + } + ], + "retval": { + "type": "RegressFooBRect*" + } + } + ], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "x" + }, + { + "doc": "", + "kind": "field", + "name": "y" + } + ], + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "add", + "parameters": [ + { + "allow_none": false, + "argname": "b2", + "direction": "in", + "type": "RegressFooBRect*" + } + ], + "retval": { + "type": "void" + } + } + ], + "name": "FooBRect" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooBoxed.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooBoxed.json new file mode 100644 index 00000000..b89073a8 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooBoxed.json @@ -0,0 +1,28 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [], + "retval": { + "type": "RegressFooBoxed*" + } + } + ], + "doc": "", + "fields": [], + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "method", + "parameters": [], + "retval": { + "type": "void" + } + } + ], + "name": "FooBoxed" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooBuffer.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooBuffer.json new file mode 100644 index 00000000..e3db76f1 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooBuffer.json @@ -0,0 +1,20 @@ +{ + "constructors": [], + "doc": "", + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "some_method", + "parameters": [], + "retval": { + "type": "void" + } + } + ], + "name": "FooBuffer", + "properties": [], + "signals": [], + "vfuncs": [] +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooBufferClass.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooBufferClass.json new file mode 100644 index 00000000..90d8e3ee --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooBufferClass.json @@ -0,0 +1,8 @@ +{ + "constructors": [], + "doc": "", + "fields": [], + "kind": "class", + "methods": [], + "name": "FooBufferClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooDBusData.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooDBusData.json new file mode 100644 index 00000000..de4ad7b8 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooDBusData.json @@ -0,0 +1,18 @@ +{ + "constructors": [], + "doc": "", + "fields": [], + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "method", + "parameters": [], + "retval": { + "type": "void" + } + } + ], + "name": "FooDBusData" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooEnumFullname.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooEnumFullname.json new file mode 100644 index 00000000..2cc1a907 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooEnumFullname.json @@ -0,0 +1,22 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "one" + }, + { + "doc": "", + "kind": "default", + "name": "two" + }, + { + "doc": "", + "kind": "default", + "name": "three" + } + ], + "name": "FooEnumFullname" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooEnumNoType.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooEnumNoType.json new file mode 100644 index 00000000..947c886c --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooEnumNoType.json @@ -0,0 +1,27 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "un" + }, + { + "doc": "", + "kind": "default", + "name": "deux" + }, + { + "doc": "", + "kind": "default", + "name": "trois" + }, + { + "doc": "", + "kind": "default", + "name": "neuf" + } + ], + "name": "FooEnumNoType" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooEnumType.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooEnumType.json new file mode 100644 index 00000000..63e11a15 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooEnumType.json @@ -0,0 +1,22 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "alpha" + }, + { + "doc": "", + "kind": "default", + "name": "beta" + }, + { + "doc": "", + "kind": "default", + "name": "delta" + } + ], + "name": "FooEnumType" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooError.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooError.json new file mode 100644 index 00000000..bd378d81 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooError.json @@ -0,0 +1,22 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "good" + }, + { + "doc": "", + "kind": "default", + "name": "bad" + }, + { + "doc": "", + "kind": "default", + "name": "ugly" + } + ], + "name": "FooError" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooEventAny.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooEventAny.json new file mode 100644 index 00000000..bbf44562 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooEventAny.json @@ -0,0 +1,14 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "send_event" + } + ], + "kind": "class", + "methods": [], + "name": "FooEventAny" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooEventExpose.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooEventExpose.json new file mode 100644 index 00000000..c9597173 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooEventExpose.json @@ -0,0 +1,19 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "send_event" + }, + { + "doc": "", + "kind": "field", + "name": "count" + } + ], + "kind": "class", + "methods": [], + "name": "FooEventExpose" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooForeignStruct.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooForeignStruct.json new file mode 100644 index 00000000..7842dc9e --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooForeignStruct.json @@ -0,0 +1,34 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [], + "retval": { + "type": "RegressFooForeignStruct*" + } + } + ], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "regress_foo" + } + ], + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "copy", + "parameters": [], + "retval": { + "type": "RegressFooForeignStruct*" + } + } + ], + "name": "FooForeignStruct" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooInterfaceIface.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooInterfaceIface.json new file mode 100644 index 00000000..2c7b2526 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooInterfaceIface.json @@ -0,0 +1,19 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "parent_iface" + }, + { + "doc": "", + "kind": "field", + "name": "do_regress_foo" + } + ], + "kind": "class", + "methods": [], + "name": "FooInterfaceIface" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooObject.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooObject.json new file mode 100644 index 00000000..006b8df3 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooObject.json @@ -0,0 +1,315 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [], + "retval": { + "type": "RegressFooObject*" + } + }, + { + "doc": "", + "kind": "constructor", + "name": "new_as_super", + "parameters": [], + "retval": { + "type": "GObject*" + } + } + ], + "doc": "", + "kind": "class", + "methods": [ + { + "doc": "

This shouldn't be scanned as a constructor.

", + "kind": "method", + "name": "append_new_stack_layer", + "parameters": [ + { + "allow_none": false, + "argname": "x", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "RegressFooOtherObject*" + } + }, + { + "doc": "", + "kind": "method", + "name": "dup_name", + "parameters": [], + "retval": { + "type": "char*" + } + }, + { + "doc": "", + "kind": "method", + "name": "external_type", + "parameters": [], + "retval": { + "type": "UtilityObject*" + } + }, + { + "doc": "", + "kind": "method", + "name": "get_name", + "parameters": [], + "retval": { + "type": "const char*" + } + }, + { + "doc": "", + "kind": "method", + "name": "handle_glyph", + "parameters": [ + { + "allow_none": false, + "argname": "glyph", + "direction": "in", + "type": "UtilityGlyph" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "is_it_time_yet", + "parameters": [ + { + "allow_none": false, + "argname": "time", + "direction": "in", + "type": "time_t" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

Not sure why this test is here...

", + "kind": "method", + "name": "new_cookie", + "parameters": [ + { + "allow_none": false, + "argname": "target", + "direction": "in", + "type": "const char*" + } + ], + "retval": { + "type": "RegressFooObjectCookie" + } + }, + { + "doc": "

Read some stuff.

", + "kind": "method", + "name": "read", + "parameters": [ + { + "allow_none": false, + "argname": "offset", + "direction": "in", + "type": "int" + }, + { + "allow_none": false, + "argname": "length", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

This is only useful from C.

", + "kind": "method", + "name": "skipped_method", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "take_all", + "parameters": [ + { + "allow_none": false, + "argname": "x", + "direction": "in", + "type": "int" + }, + { + "allow_none": false, + "argname": "...", + "direction": "in", + "type": "" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "various", + "parameters": [ + { + "allow_none": false, + "argname": "data", + "direction": "in", + "type": "void*" + }, + { + "allow_none": false, + "argname": "some_type", + "direction": "in", + "type": "GType" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "virtual_method", + "parameters": [ + { + "allow_none": false, + "argname": "first_param", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "gboolean" + } + }, + { + "doc": "", + "kind": "function", + "name": "a_global_method", + "parameters": [ + { + "allow_none": false, + "argname": "obj", + "direction": "in", + "type": "UtilityObject*" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

This function is intended to match clutter_stage_get_default which\nuses a C sugar return type.

", + "kind": "function", + "name": "get_default", + "parameters": [], + "retval": { + "type": "RegressFooObject*" + } + }, + { + "doc": "", + "kind": "function", + "name": "static_meth", + "parameters": [], + "retval": { + "type": "int" + } + } + ], + "name": "FooObject", + "properties": [ + { + "doc": "", + "kind": "property", + "name": "string", + "type": "gchar*" + } + ], + "signals": [ + { + "doc": "", + "kind": "signal", + "name": "signal", + "parameters": [ + { + "allow_none": false, + "argname": "object", + "direction": "in", + "type": "GObject" + }, + { + "allow_none": false, + "argname": "p0", + "direction": "in", + "type": "gpointer" + } + ], + "retval": { + "type": "gchar*" + } + } + ], + "vfuncs": [ + { + "doc": "

Read some stuff.

", + "kind": "vfunc", + "name": "read_fn", + "parameters": [ + { + "allow_none": false, + "argname": "offset", + "direction": "in", + "type": "int" + }, + { + "allow_none": false, + "argname": "length", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "vfunc", + "name": "virtual_method", + "parameters": [ + { + "allow_none": false, + "argname": "first_param", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "gboolean" + } + } + ] +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooObjectClass.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooObjectClass.json new file mode 100644 index 00000000..c9364e14 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooObjectClass.json @@ -0,0 +1,29 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "parent_class" + }, + { + "doc": "", + "kind": "field", + "name": "virtual_method" + }, + { + "doc": "", + "kind": "field", + "name": "read_fn" + }, + { + "doc": "", + "kind": "field", + "name": "_reserved" + } + ], + "kind": "class", + "methods": [], + "name": "FooObjectClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooOtherObject.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooOtherObject.json new file mode 100644 index 00000000..f0e278f9 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooOtherObject.json @@ -0,0 +1,10 @@ +{ + "constructors": [], + "doc": "", + "kind": "class", + "methods": [], + "name": "FooOtherObject", + "properties": [], + "signals": [], + "vfuncs": [] +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooOtherObjectClass.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooOtherObjectClass.json new file mode 100644 index 00000000..feca2459 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooOtherObjectClass.json @@ -0,0 +1,8 @@ +{ + "constructors": [], + "doc": "", + "fields": [], + "kind": "class", + "methods": [], + "name": "FooOtherObjectClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooRectangle.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooRectangle.json new file mode 100644 index 00000000..898738f5 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooRectangle.json @@ -0,0 +1,80 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "x" + }, + { + "doc": "", + "kind": "field", + "name": "y" + }, + { + "doc": "", + "kind": "field", + "name": "width" + }, + { + "doc": "", + "kind": "field", + "name": "height" + } + ], + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "add", + "parameters": [ + { + "allow_none": false, + "argname": "r2", + "direction": "in", + "type": "const RegressFooRectangle*" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

This is a C convenience constructor; we have to (skip)\nit because it's not a boxed type.

", + "kind": "function", + "name": "new", + "parameters": [ + { + "allow_none": false, + "argname": "x", + "direction": "in", + "type": "int" + }, + { + "allow_none": false, + "argname": "y", + "direction": "in", + "type": "int" + }, + { + "allow_none": false, + "argname": "width", + "direction": "in", + "type": "int" + }, + { + "allow_none": false, + "argname": "height", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "RegressFooRectangle*" + } + } + ], + "name": "FooRectangle" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooSkippable.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooSkippable.json new file mode 100644 index 00000000..36a33fbd --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooSkippable.json @@ -0,0 +1,17 @@ +{ + "doc": "

Some type that is only interesting from C and should not be\nexposed to language bindings.

", + "kind": "enum", + "members": [ + { + "doc": "

a skippable enum value

", + "kind": "default", + "name": "one" + }, + { + "doc": "

another skippable enum value

", + "kind": "default", + "name": "two" + } + ], + "name": "FooSkippable" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooStackLayer.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooStackLayer.json new file mode 100644 index 00000000..866eced4 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooStackLayer.json @@ -0,0 +1,52 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "desktop" + }, + { + "doc": "", + "kind": "default", + "name": "bottom" + }, + { + "doc": "", + "kind": "default", + "name": "normal" + }, + { + "doc": "", + "kind": "default", + "name": "top" + }, + { + "doc": "", + "kind": "default", + "name": "dock" + }, + { + "doc": "", + "kind": "default", + "name": "fullscreen" + }, + { + "doc": "", + "kind": "default", + "name": "focused_window" + }, + { + "doc": "", + "kind": "default", + "name": "override_redirect" + }, + { + "doc": "", + "kind": "default", + "name": "last" + } + ], + "name": "FooStackLayer" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooStruct.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooStruct.json new file mode 100644 index 00000000..f689b03c --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooStruct.json @@ -0,0 +1,19 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "priv" + }, + { + "doc": "", + "kind": "field", + "name": "member" + } + ], + "kind": "class", + "methods": [], + "name": "FooStruct" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooStructPrivate.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooStructPrivate.json new file mode 100644 index 00000000..1212bcd4 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooStructPrivate.json @@ -0,0 +1,8 @@ +{ + "constructors": [], + "doc": "", + "fields": [], + "kind": "class", + "methods": [], + "name": "FooStructPrivate" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooSubInterfaceIface.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooSubInterfaceIface.json new file mode 100644 index 00000000..4f32825f --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooSubInterfaceIface.json @@ -0,0 +1,29 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "parent_iface" + }, + { + "doc": "", + "kind": "field", + "name": "destroy_event" + }, + { + "doc": "", + "kind": "field", + "name": "do_bar" + }, + { + "doc": "", + "kind": "field", + "name": "do_baz" + } + ], + "kind": "class", + "methods": [], + "name": "FooSubInterfaceIface" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooSubobject.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooSubobject.json new file mode 100644 index 00000000..455f0716 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooSubobject.json @@ -0,0 +1,20 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [], + "retval": { + "type": "RegressFooSubobject*" + } + } + ], + "doc": "", + "kind": "class", + "methods": [], + "name": "FooSubobject", + "properties": [], + "signals": [], + "vfuncs": [] +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooSubobjectClass.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooSubobjectClass.json new file mode 100644 index 00000000..d0323d77 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooSubobjectClass.json @@ -0,0 +1,14 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "parent_class" + } + ], + "kind": "class", + "methods": [], + "name": "FooSubobjectClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooThingWithArray.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooThingWithArray.json new file mode 100644 index 00000000..50d85c43 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooThingWithArray.json @@ -0,0 +1,29 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "x" + }, + { + "doc": "", + "kind": "field", + "name": "y" + }, + { + "doc": "", + "kind": "field", + "name": "lines" + }, + { + "doc": "", + "kind": "field", + "name": "data" + } + ], + "kind": "class", + "methods": [], + "name": "FooThingWithArray" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.FooUtilityStruct.json b/tests/scanner/Regress-1.0-expected.json/Regress.FooUtilityStruct.json new file mode 100644 index 00000000..2e3291a6 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.FooUtilityStruct.json @@ -0,0 +1,14 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "bar" + } + ], + "kind": "class", + "methods": [], + "name": "FooUtilityStruct" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.Intset.json b/tests/scanner/Regress-1.0-expected.json/Regress.Intset.json new file mode 100644 index 00000000..66321dbe --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.Intset.json @@ -0,0 +1,8 @@ +{ + "constructors": [], + "doc": "

Like telepathy-glib's TpIntset.

", + "fields": [], + "kind": "class", + "methods": [], + "name": "Intset" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.LikeGnomeKeyringPasswordSchema.json b/tests/scanner/Regress-1.0-expected.json/Regress.LikeGnomeKeyringPasswordSchema.json new file mode 100644 index 00000000..ac4b47e6 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.LikeGnomeKeyringPasswordSchema.json @@ -0,0 +1,24 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "dummy" + }, + { + "doc": "", + "kind": "field", + "name": "attributes" + }, + { + "doc": "", + "kind": "field", + "name": "dummy2" + } + ], + "kind": "class", + "methods": [], + "name": "LikeGnomeKeyringPasswordSchema" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.LikeXklConfigItem.json b/tests/scanner/Regress-1.0-expected.json/Regress.LikeXklConfigItem.json new file mode 100644 index 00000000..6a2069a3 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.LikeXklConfigItem.json @@ -0,0 +1,31 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "name" + } + ], + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "set_name", + "parameters": [ + { + "allow_none": false, + "argname": "name", + "direction": "in", + "type": "const char*" + } + ], + "retval": { + "type": "void" + } + } + ], + "name": "LikeXklConfigItem" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.SkippedStructure.json b/tests/scanner/Regress-1.0-expected.json/Regress.SkippedStructure.json new file mode 100644 index 00000000..65eae577 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.SkippedStructure.json @@ -0,0 +1,19 @@ +{ + "constructors": [], + "doc": "

This should be skipped, and moreover, all function which\nuse it should be.

", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "x" + }, + { + "doc": "", + "kind": "field", + "name": "v" + } + ], + "kind": "class", + "methods": [], + "name": "SkippedStructure" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestABCError.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestABCError.json new file mode 100644 index 00000000..f51bc345 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestABCError.json @@ -0,0 +1,22 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "code1" + }, + { + "doc": "", + "kind": "default", + "name": "code2" + }, + { + "doc": "", + "kind": "default", + "name": "code3" + } + ], + "name": "TestABCError" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestBoxed.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestBoxed.json new file mode 100644 index 00000000..f47f9b42 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestBoxed.json @@ -0,0 +1,123 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [], + "retval": { + "type": "RegressTestBoxed*" + } + }, + { + "doc": "", + "kind": "constructor", + "name": "new_alternative_constructor1", + "parameters": [ + { + "allow_none": false, + "argname": "i", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "RegressTestBoxed*" + } + }, + { + "doc": "", + "kind": "constructor", + "name": "new_alternative_constructor2", + "parameters": [ + { + "allow_none": false, + "argname": "i", + "direction": "in", + "type": "int" + }, + { + "allow_none": false, + "argname": "j", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "RegressTestBoxed*" + } + }, + { + "doc": "", + "kind": "constructor", + "name": "new_alternative_constructor3", + "parameters": [ + { + "allow_none": false, + "argname": "s", + "direction": "in", + "type": "char*" + } + ], + "retval": { + "type": "RegressTestBoxed*" + } + } + ], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "some_int8" + }, + { + "doc": "", + "kind": "field", + "name": "nested_a" + }, + { + "doc": "", + "kind": "field", + "name": "priv" + } + ], + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "_not_a_method", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "copy", + "parameters": [], + "retval": { + "type": "RegressTestBoxed*" + } + }, + { + "doc": "", + "kind": "method", + "name": "equals", + "parameters": [ + { + "allow_none": false, + "argname": "other", + "direction": "in", + "type": "RegressTestBoxed*" + } + ], + "retval": { + "type": "gboolean" + } + } + ], + "name": "TestBoxed" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestBoxedB.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestBoxedB.json new file mode 100644 index 00000000..96f8216f --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestBoxedB.json @@ -0,0 +1,52 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [ + { + "allow_none": false, + "argname": "some_int8", + "direction": "in", + "type": "gint8" + }, + { + "allow_none": false, + "argname": "some_long", + "direction": "in", + "type": "glong" + } + ], + "retval": { + "type": "RegressTestBoxedB*" + } + } + ], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "some_int8" + }, + { + "doc": "", + "kind": "field", + "name": "some_long" + } + ], + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "copy", + "parameters": [], + "retval": { + "type": "RegressTestBoxedB*" + } + } + ], + "name": "TestBoxedB" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestBoxedC.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestBoxedC.json new file mode 100644 index 00000000..9c0eb71f --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestBoxedC.json @@ -0,0 +1,29 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [], + "retval": { + "type": "RegressTestBoxedC*" + } + } + ], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "refcount" + }, + { + "doc": "", + "kind": "field", + "name": "another_thing" + } + ], + "kind": "class", + "methods": [], + "name": "TestBoxedC" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestBoxedD.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestBoxedD.json new file mode 100644 index 00000000..5416eaad --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestBoxedD.json @@ -0,0 +1,59 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [ + { + "allow_none": false, + "argname": "a_string", + "direction": "in", + "type": "const char*" + }, + { + "allow_none": false, + "argname": "a_int", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "RegressTestBoxedD*" + } + } + ], + "doc": "", + "fields": [], + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "copy", + "parameters": [], + "retval": { + "type": "RegressTestBoxedD*" + } + }, + { + "doc": "", + "kind": "method", + "name": "free", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "get_magic", + "parameters": [], + "retval": { + "type": "int" + } + } + ], + "name": "TestBoxedD" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestBoxedPrivate.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestBoxedPrivate.json new file mode 100644 index 00000000..079d8381 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestBoxedPrivate.json @@ -0,0 +1,8 @@ +{ + "constructors": [], + "doc": "", + "fields": [], + "kind": "class", + "methods": [], + "name": "TestBoxedPrivate" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestDEFError.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestDEFError.json new file mode 100644 index 00000000..16b48a94 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestDEFError.json @@ -0,0 +1,22 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "code0" + }, + { + "doc": "", + "kind": "default", + "name": "code1" + }, + { + "doc": "", + "kind": "default", + "name": "code2" + } + ], + "name": "TestDEFError" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestEnum.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestEnum.json new file mode 100644 index 00000000..0fd8761f --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestEnum.json @@ -0,0 +1,27 @@ +{ + "doc": "

By purpose, not all members have documentation

", + "kind": "enum", + "members": [ + { + "doc": "

value 1

", + "kind": "default", + "name": "value1" + }, + { + "doc": "

value 2

", + "kind": "default", + "name": "value2" + }, + { + "doc": "", + "kind": "default", + "name": "value3" + }, + { + "doc": "", + "kind": "default", + "name": "value4" + } + ], + "name": "TestEnum" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestEnumNoGEnum.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestEnumNoGEnum.json new file mode 100644 index 00000000..521e9988 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestEnumNoGEnum.json @@ -0,0 +1,22 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "evalue1" + }, + { + "doc": "", + "kind": "default", + "name": "evalue2" + }, + { + "doc": "", + "kind": "default", + "name": "evalue3" + } + ], + "name": "TestEnumNoGEnum" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestEnumUnsigned.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestEnumUnsigned.json new file mode 100644 index 00000000..e84a1069 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestEnumUnsigned.json @@ -0,0 +1,17 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "value1" + }, + { + "doc": "", + "kind": "default", + "name": "value2" + } + ], + "name": "TestEnumUnsigned" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestError.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestError.json new file mode 100644 index 00000000..f0c5ae36 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestError.json @@ -0,0 +1,22 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "code1" + }, + { + "doc": "", + "kind": "default", + "name": "code2" + }, + { + "doc": "", + "kind": "default", + "name": "code3" + } + ], + "name": "TestError" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestFloating.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestFloating.json new file mode 100644 index 00000000..e32866e0 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestFloating.json @@ -0,0 +1,20 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [], + "retval": { + "type": "RegressTestFloating*" + } + } + ], + "doc": "", + "kind": "class", + "methods": [], + "name": "TestFloating", + "properties": [], + "signals": [], + "vfuncs": [] +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestFloatingClass.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestFloatingClass.json new file mode 100644 index 00000000..3e9150fb --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestFloatingClass.json @@ -0,0 +1,14 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "parent_class" + } + ], + "kind": "class", + "methods": [], + "name": "TestFloatingClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestFundamentalObject.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestFundamentalObject.json new file mode 100644 index 00000000..70d54aae --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestFundamentalObject.json @@ -0,0 +1,48 @@ +{ + "constructors": [], + "doc": "", + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "ref", + "parameters": [], + "retval": { + "type": "RegressTestFundamentalObject*" + } + }, + { + "doc": "", + "kind": "method", + "name": "unref", + "parameters": [], + "retval": { + "type": "void" + } + } + ], + "name": "TestFundamentalObject", + "properties": [], + "signals": [], + "vfuncs": [ + { + "doc": "", + "kind": "vfunc", + "name": "copy", + "parameters": [], + "retval": { + "type": "RegressTestFundamentalObject*" + } + }, + { + "doc": "", + "kind": "vfunc", + "name": "finalize", + "parameters": [], + "retval": { + "type": "void" + } + } + ] +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestFundamentalObjectClass.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestFundamentalObjectClass.json new file mode 100644 index 00000000..75f6d5b9 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestFundamentalObjectClass.json @@ -0,0 +1,24 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "type_class" + }, + { + "doc": "", + "kind": "field", + "name": "copy" + }, + { + "doc": "", + "kind": "field", + "name": "finalize" + } + ], + "kind": "class", + "methods": [], + "name": "TestFundamentalObjectClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestFundamentalSubObject.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestFundamentalSubObject.json new file mode 100644 index 00000000..07710900 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestFundamentalSubObject.json @@ -0,0 +1,27 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [ + { + "allow_none": false, + "argname": "data", + "direction": "in", + "type": "const char*" + } + ], + "retval": { + "type": "RegressTestFundamentalSubObject*" + } + } + ], + "doc": "", + "kind": "class", + "methods": [], + "name": "TestFundamentalSubObject", + "properties": [], + "signals": [], + "vfuncs": [] +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestFundamentalSubObjectClass.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestFundamentalSubObjectClass.json new file mode 100644 index 00000000..fa8d3a02 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestFundamentalSubObjectClass.json @@ -0,0 +1,14 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "fundamental_object_class" + } + ], + "kind": "class", + "methods": [], + "name": "TestFundamentalSubObjectClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestInheritDrawable.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestInheritDrawable.json new file mode 100644 index 00000000..67790845 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestInheritDrawable.json @@ -0,0 +1,87 @@ +{ + "constructors": [], + "doc": "", + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "do_foo", + "parameters": [ + { + "allow_none": false, + "argname": "x", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "do_foo_maybe_throw", + "parameters": [ + { + "allow_none": false, + "argname": "x", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "get_origin", + "parameters": [ + { + "allow_none": false, + "argname": "x", + "direction": "out", + "type": "int*" + }, + { + "allow_none": false, + "argname": "y", + "direction": "out", + "type": "int*" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "get_size", + "parameters": [ + { + "allow_none": false, + "argname": "width", + "direction": "out", + "type": "guint*" + }, + { + "allow_none": false, + "argname": "height", + "direction": "out", + "type": "guint*" + } + ], + "retval": { + "type": "void" + } + } + ], + "name": "TestInheritDrawable", + "properties": [], + "signals": [], + "vfuncs": [] +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestInheritDrawableClass.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestInheritDrawableClass.json new file mode 100644 index 00000000..7577e64c --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestInheritDrawableClass.json @@ -0,0 +1,14 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "parent_class" + } + ], + "kind": "class", + "methods": [], + "name": "TestInheritDrawableClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestInheritPixmapObjectClass.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestInheritPixmapObjectClass.json new file mode 100644 index 00000000..947ab70f --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestInheritPixmapObjectClass.json @@ -0,0 +1,14 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "parent_class" + } + ], + "kind": "class", + "methods": [], + "name": "TestInheritPixmapObjectClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestInterfaceIface.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestInterfaceIface.json new file mode 100644 index 00000000..278fca2d --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestInterfaceIface.json @@ -0,0 +1,14 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "base_iface" + } + ], + "kind": "class", + "methods": [], + "name": "TestInterfaceIface" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestObj.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestObj.json new file mode 100644 index 00000000..574a785e --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestObj.json @@ -0,0 +1,866 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "constructor", + "parameters": [], + "retval": { + "type": "RegressTestObj*" + } + }, + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [ + { + "allow_none": false, + "argname": "obj", + "direction": "in", + "type": "RegressTestObj*" + } + ], + "retval": { + "type": "RegressTestObj*" + } + }, + { + "doc": "", + "kind": "constructor", + "name": "new_callback", + "parameters": [ + { + "allow_none": false, + "argname": "callback", + "direction": "in", + "type": "RegressTestCallbackUserData" + }, + { + "allow_none": false, + "argname": "user_data", + "direction": "in", + "type": "gpointer" + }, + { + "allow_none": false, + "argname": "notify", + "direction": "in", + "type": "GDestroyNotify" + } + ], + "retval": { + "type": "RegressTestObj*" + } + }, + { + "doc": "", + "kind": "constructor", + "name": "new_from_file", + "parameters": [ + { + "allow_none": false, + "argname": "x", + "direction": "in", + "type": "const char*" + } + ], + "retval": { + "type": "RegressTestObj*" + } + } + ], + "doc": "", + "kind": "class", + "methods": [ + { + "doc": "

This method is virtual. Notably its name differs from the virtual\nslot name, which makes it useful for testing bindings handle this\ncase.

", + "kind": "method", + "name": "do_matrix", + "parameters": [ + { + "allow_none": false, + "argname": "somestr", + "direction": "in", + "type": "const char*" + } + ], + "retval": { + "type": "int" + } + }, + { + "doc": "", + "kind": "method", + "name": "emit_sig_with_foreign_struct", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "emit_sig_with_int64", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "emit_sig_with_obj", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "emit_sig_with_uint64", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "forced_method", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "instance_method", + "parameters": [], + "retval": { + "type": "int" + } + }, + { + "doc": "", + "kind": "method", + "name": "instance_method_callback", + "parameters": [ + { + "allow_none": true, + "argname": "callback", + "direction": "in", + "type": "RegressTestCallback" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "set_bare", + "parameters": [ + { + "allow_none": true, + "argname": "bare", + "direction": "in", + "type": "GObject*" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

Check that the out value is skipped

", + "kind": "method", + "name": "skip_inout_param", + "parameters": [ + { + "allow_none": false, + "argname": "a", + "direction": "in", + "type": "gint" + }, + { + "allow_none": false, + "argname": "out_b", + "direction": "out", + "type": "gint*" + }, + { + "allow_none": false, + "argname": "c", + "direction": "in", + "type": "gdouble" + }, + { + "allow_none": false, + "argname": "inout_d", + "direction": "inout", + "type": "gint*" + }, + { + "allow_none": false, + "argname": "out_sum", + "direction": "out", + "type": "gint*" + }, + { + "allow_none": false, + "argname": "num1", + "direction": "in", + "type": "gint" + }, + { + "allow_none": false, + "argname": "num2", + "direction": "in", + "type": "gint" + } + ], + "retval": { + "type": "gboolean" + } + }, + { + "doc": "

Check that the out value is skipped

", + "kind": "method", + "name": "skip_out_param", + "parameters": [ + { + "allow_none": false, + "argname": "a", + "direction": "in", + "type": "gint" + }, + { + "allow_none": false, + "argname": "out_b", + "direction": "out", + "type": "gint*" + }, + { + "allow_none": false, + "argname": "c", + "direction": "in", + "type": "gdouble" + }, + { + "allow_none": false, + "argname": "inout_d", + "direction": "inout", + "type": "gint*" + }, + { + "allow_none": false, + "argname": "out_sum", + "direction": "out", + "type": "gint*" + }, + { + "allow_none": false, + "argname": "num1", + "direction": "in", + "type": "gint" + }, + { + "allow_none": false, + "argname": "num2", + "direction": "in", + "type": "gint" + } + ], + "retval": { + "type": "gboolean" + } + }, + { + "doc": "

Check that a parameter is skipped

", + "kind": "method", + "name": "skip_param", + "parameters": [ + { + "allow_none": false, + "argname": "a", + "direction": "in", + "type": "gint" + }, + { + "allow_none": false, + "argname": "out_b", + "direction": "out", + "type": "gint*" + }, + { + "allow_none": false, + "argname": "c", + "direction": "in", + "type": "gdouble" + }, + { + "allow_none": false, + "argname": "inout_d", + "direction": "inout", + "type": "gint*" + }, + { + "allow_none": false, + "argname": "out_sum", + "direction": "out", + "type": "gint*" + }, + { + "allow_none": false, + "argname": "num1", + "direction": "in", + "type": "gint" + }, + { + "allow_none": false, + "argname": "num2", + "direction": "in", + "type": "gint" + } + ], + "retval": { + "type": "gboolean" + } + }, + { + "doc": "

Check that the return value is skipped

", + "kind": "method", + "name": "skip_return_val", + "parameters": [ + { + "allow_none": false, + "argname": "a", + "direction": "in", + "type": "gint" + }, + { + "allow_none": false, + "argname": "out_b", + "direction": "out", + "type": "gint*" + }, + { + "allow_none": false, + "argname": "c", + "direction": "in", + "type": "gdouble" + }, + { + "allow_none": false, + "argname": "inout_d", + "direction": "inout", + "type": "gint*" + }, + { + "allow_none": false, + "argname": "out_sum", + "direction": "out", + "type": "gint*" + }, + { + "allow_none": false, + "argname": "num1", + "direction": "in", + "type": "gint" + }, + { + "allow_none": false, + "argname": "num2", + "direction": "in", + "type": "gint" + } + ], + "retval": { + "type": "gboolean" + } + }, + { + "doc": "

Check that the return value is skipped. Succeed if a is nonzero, otherwise\nraise an error.

", + "kind": "method", + "name": "skip_return_val_no_out", + "parameters": [ + { + "allow_none": false, + "argname": "a", + "direction": "in", + "type": "gint" + } + ], + "retval": { + "type": "gboolean" + } + }, + { + "doc": "", + "kind": "method", + "name": "torture_signature_0", + "parameters": [ + { + "allow_none": false, + "argname": "x", + "direction": "in", + "type": "int" + }, + { + "allow_none": false, + "argname": "y", + "direction": "out", + "type": "double*" + }, + { + "allow_none": false, + "argname": "z", + "direction": "out", + "type": "int*" + }, + { + "allow_none": false, + "argname": "foo", + "direction": "in", + "type": "const char*" + }, + { + "allow_none": false, + "argname": "q", + "direction": "out", + "type": "int*" + }, + { + "allow_none": false, + "argname": "m", + "direction": "in", + "type": "guint" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

This function throws an error if m is odd.

", + "kind": "method", + "name": "torture_signature_1", + "parameters": [ + { + "allow_none": false, + "argname": "x", + "direction": "in", + "type": "int" + }, + { + "allow_none": false, + "argname": "y", + "direction": "out", + "type": "double*" + }, + { + "allow_none": false, + "argname": "z", + "direction": "out", + "type": "int*" + }, + { + "allow_none": false, + "argname": "foo", + "direction": "in", + "type": "const char*" + }, + { + "allow_none": false, + "argname": "q", + "direction": "out", + "type": "int*" + }, + { + "allow_none": false, + "argname": "m", + "direction": "in", + "type": "guint" + } + ], + "retval": { + "type": "gboolean" + } + }, + { + "doc": "", + "kind": "function", + "name": "null_out", + "parameters": [ + { + "allow_none": true, + "argname": "obj", + "direction": "out", + "type": "RegressTestObj**" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "function", + "name": "static_method", + "parameters": [ + { + "allow_none": false, + "argname": "x", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "double" + } + }, + { + "doc": "", + "kind": "function", + "name": "static_method_callback", + "parameters": [ + { + "allow_none": true, + "argname": "callback", + "direction": "in", + "type": "RegressTestCallback" + } + ], + "retval": { + "type": "void" + } + } + ], + "name": "TestObj", + "properties": [ + { + "doc": "", + "kind": "property", + "name": "bare", + "type": "GObject" + }, + { + "doc": "", + "kind": "property", + "name": "boxed", + "type": "RegressTestBoxed" + }, + { + "doc": "", + "kind": "property", + "name": "double", + "type": "gdouble" + }, + { + "doc": "", + "kind": "property", + "name": "float", + "type": "gfloat" + }, + { + "doc": "", + "kind": "property", + "name": "gtype", + "type": "GType" + }, + { + "doc": "", + "kind": "property", + "name": "hash-table", + "type": "" + }, + { + "doc": "", + "kind": "property", + "name": "hash-table-old", + "type": "" + }, + { + "doc": "", + "kind": "property", + "name": "int", + "type": "gint" + }, + { + "doc": "", + "kind": "property", + "name": "list", + "type": "gpointer" + }, + { + "doc": "", + "kind": "property", + "name": "list-old", + "type": "gpointer" + }, + { + "doc": "", + "kind": "property", + "name": "string", + "type": "gchar*" + } + ], + "signals": [ + { + "doc": "", + "kind": "signal", + "name": "all", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "signal", + "name": "cleanup", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "signal", + "name": "first", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "

This test signal similar to GSettings::change-event

", + "kind": "signal", + "name": "sig-with-array-len-prop", + "parameters": [ + { + "allow_none": true, + "argname": "arr", + "direction": "in", + "type": "guint*" + }, + { + "allow_none": false, + "argname": "len", + "direction": "in", + "type": "gint" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

This test signal is like TelepathyGlib's\n TpChannel:: group-members-changed-detailed:

", + "kind": "signal", + "name": "sig-with-array-prop", + "parameters": [ + { + "allow_none": false, + "argname": "arr", + "direction": "in", + "type": "guint*" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "signal", + "name": "sig-with-foreign-struct", + "parameters": [ + { + "allow_none": false, + "argname": "cr", + "direction": "in", + "type": "cairo_t" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

This test signal is like TelepathyGlib's\n TpAccount::status-changed

", + "kind": "signal", + "name": "sig-with-hash-prop", + "parameters": [ + { + "allow_none": false, + "argname": "hash", + "direction": "in", + "type": "" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

You can use this with regress_test_obj_emit_sig_with_int64, or raise from\nthe introspection client langage.

", + "kind": "signal", + "name": "sig-with-int64-prop", + "parameters": [ + { + "allow_none": false, + "argname": "i", + "direction": "in", + "type": "gint64" + } + ], + "retval": { + "type": "gint64" + } + }, + { + "doc": "", + "kind": "signal", + "name": "sig-with-intarray-ret", + "parameters": [ + { + "allow_none": false, + "argname": "i", + "direction": "in", + "type": "gint" + } + ], + "retval": { + "type": "gint*" + } + }, + { + "doc": "

Test transfer none GObject as a param (tests refcounting).\nUse with regress_test_obj_emit_sig_with_obj

", + "kind": "signal", + "name": "sig-with-obj", + "parameters": [ + { + "allow_none": false, + "argname": "obj", + "direction": "in", + "type": "GObject" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

Test GStrv as a param.

", + "kind": "signal", + "name": "sig-with-strv", + "parameters": [ + { + "allow_none": false, + "argname": "strs", + "direction": "in", + "type": "utf8*" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

You can use this with regress_test_obj_emit_sig_with_uint64, or raise from\nthe introspection client langage.

", + "kind": "signal", + "name": "sig-with-uint64-prop", + "parameters": [ + { + "allow_none": false, + "argname": "i", + "direction": "in", + "type": "guint64" + } + ], + "retval": { + "type": "guint64" + } + }, + { + "doc": "", + "kind": "signal", + "name": "test", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "signal", + "name": "test-with-static-scope-arg", + "parameters": [ + { + "allow_none": false, + "argname": "object", + "direction": "in", + "type": "RegressTestSimpleBoxedA" + } + ], + "retval": { + "type": "void" + } + } + ], + "vfuncs": [ + { + "doc": "", + "kind": "vfunc", + "name": "allow_none_vfunc", + "parameters": [ + { + "allow_none": true, + "argname": "two", + "direction": "in", + "type": "RegressTestObj*" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "vfunc", + "name": "complex_vfunc", + "parameters": [ + { + "allow_none": false, + "argname": "someint", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

This method is virtual. Notably its name differs from the virtual\nslot name, which makes it useful for testing bindings handle this\ncase.

", + "kind": "vfunc", + "name": "matrix", + "parameters": [ + { + "allow_none": false, + "argname": "somestr", + "direction": "in", + "type": "const char*" + } + ], + "retval": { + "type": "int" + } + } + ] +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestObjClass.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestObjClass.json new file mode 100644 index 00000000..cfc3196d --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestObjClass.json @@ -0,0 +1,49 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "parent_class" + }, + { + "doc": "", + "kind": "field", + "name": "matrix" + }, + { + "doc": "", + "kind": "field", + "name": "allow_none_vfunc" + }, + { + "doc": "", + "kind": "field", + "name": "test_signal" + }, + { + "doc": "", + "kind": "field", + "name": "test_signal_with_static_scope_arg" + }, + { + "doc": "", + "kind": "field", + "name": "complex_vfunc" + }, + { + "doc": "", + "kind": "field", + "name": "_regress_reserved1" + }, + { + "doc": "", + "kind": "field", + "name": "_regress_reserved2" + } + ], + "kind": "class", + "methods": [], + "name": "TestObjClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestOtherError.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestOtherError.json new file mode 100644 index 00000000..b2a1704f --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestOtherError.json @@ -0,0 +1,22 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "code1" + }, + { + "doc": "", + "kind": "default", + "name": "code2" + }, + { + "doc": "", + "kind": "default", + "name": "code3" + } + ], + "name": "TestOtherError" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestPrivateStruct.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestPrivateStruct.json new file mode 100644 index 00000000..cffc2738 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestPrivateStruct.json @@ -0,0 +1,24 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "this_is_public_before" + }, + { + "doc": "", + "kind": "field", + "name": "this_is_private" + }, + { + "doc": "", + "kind": "field", + "name": "this_is_public_after" + } + ], + "kind": "class", + "methods": [], + "name": "TestPrivateStruct" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestReferenceEnum.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestReferenceEnum.json new file mode 100644 index 00000000..fb43978d --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestReferenceEnum.json @@ -0,0 +1,37 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "0" + }, + { + "doc": "", + "kind": "default", + "name": "1" + }, + { + "doc": "", + "kind": "default", + "name": "2" + }, + { + "doc": "", + "kind": "default", + "name": "3" + }, + { + "doc": "", + "kind": "default", + "name": "4" + }, + { + "doc": "", + "kind": "default", + "name": "5" + } + ], + "name": "TestReferenceEnum" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestSimpleBoxedA.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestSimpleBoxedA.json new file mode 100644 index 00000000..6114e349 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestSimpleBoxedA.json @@ -0,0 +1,64 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "some_int" + }, + { + "doc": "", + "kind": "field", + "name": "some_int8" + }, + { + "doc": "", + "kind": "field", + "name": "some_double" + }, + { + "doc": "", + "kind": "field", + "name": "some_enum" + } + ], + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "copy", + "parameters": [], + "retval": { + "type": "RegressTestSimpleBoxedA*" + } + }, + { + "doc": "", + "kind": "method", + "name": "equals", + "parameters": [ + { + "allow_none": false, + "argname": "other_a", + "direction": "in", + "type": "RegressTestSimpleBoxedA*" + } + ], + "retval": { + "type": "gboolean" + } + }, + { + "doc": "", + "kind": "function", + "name": "const_return", + "parameters": [], + "retval": { + "type": "const RegressTestSimpleBoxedA*" + } + } + ], + "name": "TestSimpleBoxedA" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestSimpleBoxedB.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestSimpleBoxedB.json new file mode 100644 index 00000000..8db557fb --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestSimpleBoxedB.json @@ -0,0 +1,29 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "some_int8" + }, + { + "doc": "", + "kind": "field", + "name": "nested_a" + } + ], + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "copy", + "parameters": [], + "retval": { + "type": "RegressTestSimpleBoxedB*" + } + } + ], + "name": "TestSimpleBoxedB" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestStructA.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestStructA.json new file mode 100644 index 00000000..bc891eab --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestStructA.json @@ -0,0 +1,68 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "some_int" + }, + { + "doc": "", + "kind": "field", + "name": "some_int8" + }, + { + "doc": "", + "kind": "field", + "name": "some_double" + }, + { + "doc": "", + "kind": "field", + "name": "some_enum" + } + ], + "kind": "class", + "methods": [ + { + "doc": "

Make a copy of a RegressTestStructA

", + "kind": "method", + "name": "clone", + "parameters": [ + { + "allow_none": false, + "argname": "a_out", + "direction": "out", + "type": "RegressTestStructA*" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "function", + "name": "parse", + "parameters": [ + { + "allow_none": false, + "argname": "a_out", + "direction": "out", + "type": "RegressTestStructA*" + }, + { + "allow_none": false, + "argname": "string", + "direction": "in", + "type": "const gchar*" + } + ], + "retval": { + "type": "void" + } + } + ], + "name": "TestStructA" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestStructB.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestStructB.json new file mode 100644 index 00000000..bf19168f --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestStructB.json @@ -0,0 +1,36 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "some_int8" + }, + { + "doc": "", + "kind": "field", + "name": "nested_a" + } + ], + "kind": "class", + "methods": [ + { + "doc": "

Make a copy of a RegressTestStructB

", + "kind": "method", + "name": "clone", + "parameters": [ + { + "allow_none": false, + "argname": "b_out", + "direction": "out", + "type": "RegressTestStructB*" + } + ], + "retval": { + "type": "void" + } + } + ], + "name": "TestStructB" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestStructC.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestStructC.json new file mode 100644 index 00000000..9a00e6cf --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestStructC.json @@ -0,0 +1,19 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "another_int" + }, + { + "doc": "", + "kind": "field", + "name": "obj" + } + ], + "kind": "class", + "methods": [], + "name": "TestStructC" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestStructD.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestStructD.json new file mode 100644 index 00000000..ba3c674f --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestStructD.json @@ -0,0 +1,34 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "array1" + }, + { + "doc": "", + "kind": "field", + "name": "array2" + }, + { + "doc": "", + "kind": "field", + "name": "field" + }, + { + "doc": "", + "kind": "field", + "name": "list" + }, + { + "doc": "", + "kind": "field", + "name": "garray" + } + ], + "kind": "class", + "methods": [], + "name": "TestStructD" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestStructE.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestStructE.json new file mode 100644 index 00000000..36fc98cf --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestStructE.json @@ -0,0 +1,19 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "some_type" + }, + { + "doc": "", + "kind": "field", + "name": "some_union" + } + ], + "kind": "class", + "methods": [], + "name": "TestStructE" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestStructF.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestStructF.json new file mode 100644 index 00000000..f2b3dc6e --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestStructF.json @@ -0,0 +1,44 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "ref_count" + }, + { + "doc": "", + "kind": "field", + "name": "data1" + }, + { + "doc": "", + "kind": "field", + "name": "data2" + }, + { + "doc": "", + "kind": "field", + "name": "data3" + }, + { + "doc": "", + "kind": "field", + "name": "data4" + }, + { + "doc": "", + "kind": "field", + "name": "data5" + }, + { + "doc": "", + "kind": "field", + "name": "data6" + } + ], + "kind": "class", + "methods": [], + "name": "TestStructF" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestStructFixedArray.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestStructFixedArray.json new file mode 100644 index 00000000..2811683d --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestStructFixedArray.json @@ -0,0 +1,29 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "just_int" + }, + { + "doc": "", + "kind": "field", + "name": "array" + } + ], + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "frob", + "parameters": [], + "retval": { + "type": "void" + } + } + ], + "name": "TestStructFixedArray" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestSubObj.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestSubObj.json new file mode 100644 index 00000000..b994d061 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestSubObj.json @@ -0,0 +1,39 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [], + "retval": { + "type": "RegressTestObj*" + } + } + ], + "doc": "", + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "instance_method", + "parameters": [], + "retval": { + "type": "int" + } + }, + { + "doc": "", + "kind": "method", + "name": "unset_bare", + "parameters": [], + "retval": { + "type": "void" + } + } + ], + "name": "TestSubObj", + "properties": [], + "signals": [], + "vfuncs": [] +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestSubObjClass.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestSubObjClass.json new file mode 100644 index 00000000..f2493784 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestSubObjClass.json @@ -0,0 +1,14 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "parent_class" + } + ], + "kind": "class", + "methods": [], + "name": "TestSubObjClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestWi8021x.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestWi8021x.json new file mode 100644 index 00000000..cc658fee --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestWi8021x.json @@ -0,0 +1,69 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [], + "retval": { + "type": "RegressTestWi8021x*" + } + } + ], + "doc": "", + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "get_testbool", + "parameters": [], + "retval": { + "type": "gboolean" + } + }, + { + "doc": "", + "kind": "method", + "name": "set_testbool", + "parameters": [ + { + "allow_none": false, + "argname": "v", + "direction": "in", + "type": "gboolean" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "function", + "name": "static_method", + "parameters": [ + { + "allow_none": false, + "argname": "x", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "int" + } + } + ], + "name": "TestWi8021x", + "properties": [ + { + "doc": "", + "kind": "property", + "name": "testbool", + "type": "gboolean" + } + ], + "signals": [], + "vfuncs": [] +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0-expected.json/Regress.TestWi8021xClass.json b/tests/scanner/Regress-1.0-expected.json/Regress.TestWi8021xClass.json new file mode 100644 index 00000000..6e871ce8 --- /dev/null +++ b/tests/scanner/Regress-1.0-expected.json/Regress.TestWi8021xClass.json @@ -0,0 +1,14 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "parent_class" + } + ], + "kind": "class", + "methods": [], + "name": "TestWi8021xClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress-1.0.json b/tests/scanner/Regress-1.0.json/Regress-1.0.json new file mode 100644 index 00000000..39cb003d --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress-1.0.json @@ -0,0 +1,1352 @@ +{ + "classes": [ + { + "doc": "

This is an object used to test annotations.

", + "kind": "class", + "name": "AnnotationObject" + }, + { + "doc": "", + "kind": "class", + "name": "FooBuffer" + }, + { + "doc": "", + "kind": "class", + "name": "FooObject" + }, + { + "doc": "", + "kind": "class", + "name": "FooOtherObject" + }, + { + "doc": "", + "kind": "class", + "name": "FooSubobject" + }, + { + "doc": "", + "kind": "class", + "name": "TestFloating" + }, + { + "doc": "", + "kind": "class", + "name": "TestFundamentalObject" + }, + { + "doc": "", + "kind": "class", + "name": "TestFundamentalSubObject" + }, + { + "doc": "", + "kind": "class", + "name": "TestInheritDrawable" + }, + { + "doc": "", + "kind": "class", + "name": "TestObj" + }, + { + "doc": "", + "kind": "class", + "name": "TestSubObj" + }, + { + "doc": "", + "kind": "class", + "name": "TestWi8021x" + } + ], + "enums": [ + { + "doc": "", + "kind": "enum", + "name": "ATestError" + }, + { + "doc": "", + "kind": "enum", + "name": "FooASingle" + }, + { + "doc": "", + "kind": "enum", + "name": "FooAddressType" + }, + { + "doc": "", + "kind": "enum", + "name": "FooEnumFullname" + }, + { + "doc": "", + "kind": "enum", + "name": "FooEnumNoType" + }, + { + "doc": "", + "kind": "enum", + "name": "FooEnumType" + }, + { + "doc": "", + "kind": "enum", + "name": "FooError" + }, + { + "doc": "

Some type that is only interesting from C and should not be\nexposed to language bindings.

", + "kind": "enum", + "name": "FooSkippable" + }, + { + "doc": "", + "kind": "enum", + "name": "FooStackLayer" + }, + { + "doc": "", + "kind": "enum", + "name": "TestABCError" + }, + { + "doc": "", + "kind": "enum", + "name": "TestDEFError" + }, + { + "doc": "

By purpose, not all members have documentation

", + "kind": "enum", + "name": "TestEnum" + }, + { + "doc": "", + "kind": "enum", + "name": "TestEnumNoGEnum" + }, + { + "doc": "", + "kind": "enum", + "name": "TestEnumUnsigned" + }, + { + "doc": "", + "kind": "enum", + "name": "TestError" + }, + { + "doc": "", + "kind": "enum", + "name": "TestOtherError" + }, + { + "doc": "", + "kind": "enum", + "name": "TestReferenceEnum" + } + ], + "functions": [ + { + "doc": "", + "kind": "function", + "name": "aliased_caller_alloc" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_attribute_func" + }, + { + "doc": "

Test messing up the heuristic of closure/destroy-notification\ndetection, and fixing it via annotations.

", + "kind": "function", + "name": "annotation_custom_destroy" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_get_source_file" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_init" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_invalid_regress_annotation" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_ptr_array" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_return_array" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_return_filename" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_set_source_file" + }, + { + "doc": "

Explicitly test having a space after the ** here.

", + "kind": "function", + "name": "annotation_space_after_comment_bug631690" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_string_array_length" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_string_zero_terminated" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_string_zero_terminated_out" + }, + { + "doc": "

See https://bugzilla.gnome.org/show_bug.cgi?id=630862

", + "kind": "function", + "name": "annotation_test_parsing_bug630862" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_transfer_floating" + }, + { + "doc": "", + "kind": "function", + "name": "annotation_versioned" + }, + { + "doc": "", + "kind": "function", + "name": "atest_error_quark" + }, + { + "doc": "", + "kind": "function", + "name": "foo_async_ready_callback" + }, + { + "doc": "", + "kind": "function", + "name": "foo_destroy_notify_callback" + }, + { + "doc": "", + "kind": "function", + "name": "foo_enum_type_method" + }, + { + "doc": "", + "kind": "function", + "name": "foo_enum_type_returnv" + }, + { + "doc": "", + "kind": "function", + "name": "foo_error_quark" + }, + { + "doc": "", + "kind": "function", + "name": "foo_init" + }, + { + "doc": "", + "kind": "function", + "name": "foo_interface_static_method" + }, + { + "doc": "", + "kind": "function", + "name": "foo_method_external_references" + }, + { + "doc": "

This should be scanned as a top-level function, and shouldn't cause\na \"Can't find matching type for constructor\" warning.

", + "kind": "function", + "name": "foo_not_a_constructor_new" + }, + { + "doc": "

This is a C convenience constructor; we have to (skip)\nit because it's not a boxed type.

", + "kind": "function", + "name": "foo_rectangle_new" + }, + { + "doc": "

Does something that's only interesting from C and should not be\nexposed to language bindings.

", + "kind": "function", + "name": "foo_skip_me" + }, + { + "doc": "", + "kind": "function", + "name": "foo_some_variant" + }, + { + "doc": "", + "kind": "function", + "name": "foo_some_variant_ptr" + }, + { + "doc": "", + "kind": "function", + "name": "foo_test_array" + }, + { + "doc": "", + "kind": "function", + "name": "foo_test_const_char_param" + }, + { + "doc": "", + "kind": "function", + "name": "foo_test_const_char_retval" + }, + { + "doc": "", + "kind": "function", + "name": "foo_test_const_struct_param" + }, + { + "doc": "", + "kind": "function", + "name": "foo_test_const_struct_retval" + }, + { + "doc": "", + "kind": "function", + "name": "foo_test_string_array" + }, + { + "doc": "", + "kind": "function", + "name": "foo_test_string_array_with_g" + }, + { + "doc": "", + "kind": "function", + "name": "foo_test_unsigned_qualifier" + }, + { + "doc": "", + "kind": "function", + "name": "foo_test_unsigned_type" + }, + { + "doc": "", + "kind": "function", + "name": "foo_test_varargs_callback" + }, + { + "doc": "", + "kind": "function", + "name": "foo_test_varargs_callback2" + }, + { + "doc": "", + "kind": "function", + "name": "foo_test_varargs_callback3" + }, + { + "doc": "", + "kind": "function", + "name": "func_obj_null_in" + }, + { + "doc": "", + "kind": "function", + "name": "global_get_flags_out" + }, + { + "doc": "

This test case mirrors GnomeKeyringPasswordSchema from\nlibgnome-keyring.

", + "kind": "function", + "name": "has_parameter_named_attrs" + }, + { + "doc": "", + "kind": "function", + "name": "introspectable_via_alias" + }, + { + "doc": "", + "kind": "function", + "name": "not_introspectable_via_alias" + }, + { + "doc": "", + "kind": "function", + "name": "random_function_with_skipped_structure" + }, + { + "doc": "", + "kind": "function", + "name": "set_abort_on_error" + }, + { + "doc": "", + "kind": "function", + "name": "test_abc_error_quark" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_callback" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_fixed_out_objects" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_fixed_size_int_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_fixed_size_int_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_fixed_size_int_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_gint16_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_gint32_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_gint64_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_gint8_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_gtype_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_int_full_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_int_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_int_inout" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_int_none_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_int_null_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_int_null_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_array_int_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_async_ready_callback" + }, + { + "doc": "", + "kind": "function", + "name": "test_boolean" + }, + { + "doc": "", + "kind": "function", + "name": "test_boolean_false" + }, + { + "doc": "", + "kind": "function", + "name": "test_boolean_true" + }, + { + "doc": "", + "kind": "function", + "name": "test_boxeds_not_a_method" + }, + { + "doc": "", + "kind": "function", + "name": "test_boxeds_not_a_static" + }, + { + "doc": "", + "kind": "function", + "name": "test_cairo_context_full_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_cairo_context_none_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_cairo_surface_full_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_cairo_surface_full_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_cairo_surface_none_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_cairo_surface_none_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_callback" + }, + { + "doc": "", + "kind": "function", + "name": "test_callback_async" + }, + { + "doc": "

Notified - callback persists until a DestroyNotify delegate\nis invoked.

", + "kind": "function", + "name": "test_callback_destroy_notify" + }, + { + "doc": "

Adds a scope notified callback with no user data. This can invoke an error\ncondition in bindings which needs to be tested.

", + "kind": "function", + "name": "test_callback_destroy_notify_no_user_data" + }, + { + "doc": "", + "kind": "function", + "name": "test_callback_thaw_async" + }, + { + "doc": "

Invokes all callbacks installed by #test_callback_destroy_notify(),\nadding up their return values, and removes them, invoking the\ncorresponding destroy notfications.

", + "kind": "function", + "name": "test_callback_thaw_notifications" + }, + { + "doc": "

Call - callback parameter persists for the duration of the method\ncall and can be released on return.

", + "kind": "function", + "name": "test_callback_user_data" + }, + { + "doc": "", + "kind": "function", + "name": "test_closure" + }, + { + "doc": "", + "kind": "function", + "name": "test_closure_one_arg" + }, + { + "doc": "", + "kind": "function", + "name": "test_closure_variant" + }, + { + "doc": "", + "kind": "function", + "name": "test_date_in_gvalue" + }, + { + "doc": "", + "kind": "function", + "name": "test_def_error_quark" + }, + { + "doc": "", + "kind": "function", + "name": "test_double" + }, + { + "doc": "", + "kind": "function", + "name": "test_enum_param" + }, + { + "doc": "", + "kind": "function", + "name": "test_error_quark" + }, + { + "doc": "", + "kind": "function", + "name": "test_filename_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_float" + }, + { + "doc": "", + "kind": "function", + "name": "test_garray_container_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_garray_full_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_gerror_callback" + }, + { + "doc": "", + "kind": "function", + "name": "test_ghash_container_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_ghash_everything_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_ghash_gvalue_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_ghash_gvalue_return" + }, + { + "doc": "

Specify nested parameterized types directly with the (type ) annotation.

", + "kind": "function", + "name": "test_ghash_nested_everything_return" + }, + { + "doc": "

Another way of specifying nested parameterized types: using the\nelement-type annotation.

", + "kind": "function", + "name": "test_ghash_nested_everything_return2" + }, + { + "doc": "", + "kind": "function", + "name": "test_ghash_nothing_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_ghash_nothing_in2" + }, + { + "doc": "", + "kind": "function", + "name": "test_ghash_nothing_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_ghash_nothing_return2" + }, + { + "doc": "", + "kind": "function", + "name": "test_ghash_null_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_ghash_null_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_ghash_null_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_glist_container_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_glist_everything_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_glist_nothing_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_glist_nothing_in2" + }, + { + "doc": "", + "kind": "function", + "name": "test_glist_nothing_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_glist_nothing_return2" + }, + { + "doc": "", + "kind": "function", + "name": "test_glist_null_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_glist_null_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_gslist_container_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_gslist_everything_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_gslist_nothing_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_gslist_nothing_in2" + }, + { + "doc": "", + "kind": "function", + "name": "test_gslist_nothing_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_gslist_nothing_return2" + }, + { + "doc": "", + "kind": "function", + "name": "test_gslist_null_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_gslist_null_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_gtype" + }, + { + "doc": "", + "kind": "function", + "name": "test_gvariant_as" + }, + { + "doc": "", + "kind": "function", + "name": "test_gvariant_asv" + }, + { + "doc": "", + "kind": "function", + "name": "test_gvariant_i" + }, + { + "doc": "", + "kind": "function", + "name": "test_gvariant_s" + }, + { + "doc": "", + "kind": "function", + "name": "test_gvariant_v" + }, + { + "doc": "", + "kind": "function", + "name": "test_hash_table_callback" + }, + { + "doc": "", + "kind": "function", + "name": "test_int" + }, + { + "doc": "", + "kind": "function", + "name": "test_int16" + }, + { + "doc": "", + "kind": "function", + "name": "test_int32" + }, + { + "doc": "", + "kind": "function", + "name": "test_int64" + }, + { + "doc": "", + "kind": "function", + "name": "test_int8" + }, + { + "doc": "", + "kind": "function", + "name": "test_int_out_utf8" + }, + { + "doc": "", + "kind": "function", + "name": "test_int_value_arg" + }, + { + "doc": "", + "kind": "function", + "name": "test_long" + }, + { + "doc": "", + "kind": "function", + "name": "test_multi_callback" + }, + { + "doc": "", + "kind": "function", + "name": "test_multi_double_args" + }, + { + "doc": "

This is a function.

It has multiple lines in the documentation.

The sky is blue.

You will give me your credit card number.

", + "kind": "function", + "name": "test_multiline_doc_comments" + }, + { + "doc": "

<informaltable>\n <tgroup cols=\"3\">\n <thead>\n <row>\n <entry>Syntax</entry>\n <entry>Explanation</entry>\n <entry>Examples</entry>\n </row>\n </thead>\n <tbody>\n <row>\n <entry>rgb(@r, @g, @b)</entry>\n <entry>An opaque color; @r, @g, @b can be either integers between\n 0 and 255 or percentages</entry>\n <entry><literallayout>rgb(128, 10, 54)\nrgb(20%, 30%, 0%)</literallayout></entry>\n </row>\n <row>\n <entry>rgba(@r, @g, @b, a)</entry>\n <entry>A translucent color; @r, @g, @b are as in the previous row,\n a is a floating point number between 0 and 1</entry>\n <entry><literallayout>rgba(255, 255, 0, 0.5)</literallayout></entry>\n </row>\n </tbody>\n </tgroup>\n</informaltable>

What we're testing here is that the scanner ignores the a nested inside XML.

", + "kind": "function", + "name": "test_nested_parameter" + }, + { + "doc": "", + "kind": "function", + "name": "test_null_gerror_callback" + }, + { + "doc": "", + "kind": "function", + "name": "test_owned_gerror_callback" + }, + { + "doc": "", + "kind": "function", + "name": "test_short" + }, + { + "doc": "", + "kind": "function", + "name": "test_simple_boxed_a_const_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_simple_callback" + }, + { + "doc": "", + "kind": "function", + "name": "test_size" + }, + { + "doc": "

Should not emit a warning:\nhttps://bugzilla.gnome.org/show_bug.cgi?id=685399

", + "kind": "function", + "name": "test_skip_unannotated_callback" + }, + { + "doc": "", + "kind": "function", + "name": "test_ssize" + }, + { + "doc": "", + "kind": "function", + "name": "test_struct_a_parse" + }, + { + "doc": "", + "kind": "function", + "name": "test_strv_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_strv_in_gvalue" + }, + { + "doc": "", + "kind": "function", + "name": "test_strv_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_strv_out_c" + }, + { + "doc": "", + "kind": "function", + "name": "test_strv_out_container" + }, + { + "doc": "", + "kind": "function", + "name": "test_strv_outarg" + }, + { + "doc": "", + "kind": "function", + "name": "test_timet" + }, + { + "doc": "", + "kind": "function", + "name": "test_torture_signature_0" + }, + { + "doc": "

This function throws an error if m is odd.

", + "kind": "function", + "name": "test_torture_signature_1" + }, + { + "doc": "", + "kind": "function", + "name": "test_torture_signature_2" + }, + { + "doc": "", + "kind": "function", + "name": "test_uint" + }, + { + "doc": "", + "kind": "function", + "name": "test_uint16" + }, + { + "doc": "", + "kind": "function", + "name": "test_uint32" + }, + { + "doc": "", + "kind": "function", + "name": "test_uint64" + }, + { + "doc": "", + "kind": "function", + "name": "test_uint8" + }, + { + "doc": "", + "kind": "function", + "name": "test_ulong" + }, + { + "doc": "", + "kind": "function", + "name": "test_unconventional_error_quark" + }, + { + "doc": "", + "kind": "function", + "name": "test_unichar" + }, + { + "doc": "", + "kind": "function", + "name": "test_unsigned_enum_param" + }, + { + "doc": "", + "kind": "function", + "name": "test_ushort" + }, + { + "doc": "", + "kind": "function", + "name": "test_utf8_const_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_utf8_const_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_utf8_inout" + }, + { + "doc": "", + "kind": "function", + "name": "test_utf8_nonconst_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_utf8_null_in" + }, + { + "doc": "", + "kind": "function", + "name": "test_utf8_null_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_utf8_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_utf8_out_nonconst_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_utf8_out_out" + }, + { + "doc": "", + "kind": "function", + "name": "test_value_get_fundamental_object" + }, + { + "doc": "

This is a test of Markdown formatting within a comment.

", + "kind": "function", + "name": "test_value_return" + }, + { + "doc": "", + "kind": "function", + "name": "test_value_set_fundamental_object" + }, + { + "doc": "", + "kind": "function", + "name": "test_versioning" + } + ], + "name": "Regress", + "records": [ + { + "doc": "", + "kind": "class", + "name": "AnAnonymousUnion" + }, + { + "doc": "

This is a struct for testing field documentation and annotations

", + "kind": "class", + "name": "AnnotationFields" + }, + { + "doc": "", + "kind": "class", + "name": "AnnotationObjectClass" + }, + { + "doc": "

This is a test of an array of object in an field of a struct.

", + "kind": "class", + "name": "AnnotationStruct" + }, + { + "doc": "", + "kind": "class", + "name": "FooBRect" + }, + { + "doc": "", + "kind": "class", + "name": "FooBoxed" + }, + { + "doc": "", + "kind": "class", + "name": "FooBufferClass" + }, + { + "doc": "", + "kind": "class", + "name": "FooDBusData" + }, + { + "doc": "", + "kind": "class", + "name": "FooEventAny" + }, + { + "doc": "", + "kind": "class", + "name": "FooEventExpose" + }, + { + "doc": "", + "kind": "class", + "name": "FooForeignStruct" + }, + { + "doc": "", + "kind": "class", + "name": "FooInterfaceIface" + }, + { + "doc": "", + "kind": "class", + "name": "FooObjectClass" + }, + { + "doc": "", + "kind": "class", + "name": "FooOtherObjectClass" + }, + { + "doc": "", + "kind": "class", + "name": "FooRectangle" + }, + { + "doc": "", + "kind": "class", + "name": "FooStruct" + }, + { + "doc": "", + "kind": "class", + "name": "FooStructPrivate" + }, + { + "doc": "", + "kind": "class", + "name": "FooSubInterfaceIface" + }, + { + "doc": "", + "kind": "class", + "name": "FooSubobjectClass" + }, + { + "doc": "", + "kind": "class", + "name": "FooThingWithArray" + }, + { + "doc": "", + "kind": "class", + "name": "FooUtilityStruct" + }, + { + "doc": "

Like telepathy-glib's TpIntset.

", + "kind": "class", + "name": "Intset" + }, + { + "doc": "", + "kind": "class", + "name": "LikeGnomeKeyringPasswordSchema" + }, + { + "doc": "", + "kind": "class", + "name": "LikeXklConfigItem" + }, + { + "doc": "

This should be skipped, and moreover, all function which\nuse it should be.

", + "kind": "class", + "name": "SkippedStructure" + }, + { + "doc": "", + "kind": "class", + "name": "TestBoxed" + }, + { + "doc": "", + "kind": "class", + "name": "TestBoxedB" + }, + { + "doc": "", + "kind": "class", + "name": "TestBoxedC" + }, + { + "doc": "", + "kind": "class", + "name": "TestBoxedD" + }, + { + "doc": "", + "kind": "class", + "name": "TestBoxedPrivate" + }, + { + "doc": "", + "kind": "class", + "name": "TestFloatingClass" + }, + { + "doc": "", + "kind": "class", + "name": "TestFundamentalObjectClass" + }, + { + "doc": "", + "kind": "class", + "name": "TestFundamentalSubObjectClass" + }, + { + "doc": "", + "kind": "class", + "name": "TestInheritDrawableClass" + }, + { + "doc": "", + "kind": "class", + "name": "TestInheritPixmapObjectClass" + }, + { + "doc": "", + "kind": "class", + "name": "TestInterfaceIface" + }, + { + "doc": "", + "kind": "class", + "name": "TestObjClass" + }, + { + "doc": "", + "kind": "class", + "name": "TestPrivateStruct" + }, + { + "doc": "", + "kind": "class", + "name": "TestSimpleBoxedA" + }, + { + "doc": "", + "kind": "class", + "name": "TestSimpleBoxedB" + }, + { + "doc": "", + "kind": "class", + "name": "TestStructA" + }, + { + "doc": "", + "kind": "class", + "name": "TestStructB" + }, + { + "doc": "", + "kind": "class", + "name": "TestStructC" + }, + { + "doc": "", + "kind": "class", + "name": "TestStructD" + }, + { + "doc": "", + "kind": "class", + "name": "TestStructE" + }, + { + "doc": "", + "kind": "class", + "name": "TestStructF" + }, + { + "doc": "", + "kind": "class", + "name": "TestStructFixedArray" + }, + { + "doc": "", + "kind": "class", + "name": "TestSubObjClass" + }, + { + "doc": "", + "kind": "class", + "name": "TestWi8021xClass" + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.ATestError.json b/tests/scanner/Regress-1.0.json/Regress.ATestError.json new file mode 100644 index 00000000..d1b5678c --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.ATestError.json @@ -0,0 +1,22 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "code0" + }, + { + "doc": "", + "kind": "default", + "name": "code1" + }, + { + "doc": "", + "kind": "default", + "name": "code2" + } + ], + "name": "ATestError" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.AnAnonymousUnion.json b/tests/scanner/Regress-1.0.json/Regress.AnAnonymousUnion.json new file mode 100644 index 00000000..9e4b2174 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.AnAnonymousUnion.json @@ -0,0 +1,19 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "x" + }, + { + "doc": "", + "kind": "field", + "name": null + } + ], + "kind": "class", + "methods": [], + "name": "AnAnonymousUnion" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.AnnotationFields.json b/tests/scanner/Regress-1.0.json/Regress.AnnotationFields.json new file mode 100644 index 00000000..ee054269 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.AnnotationFields.json @@ -0,0 +1,24 @@ +{ + "constructors": [], + "doc": "

This is a struct for testing field documentation and annotations

", + "fields": [ + { + "doc": "

Some documentation

", + "kind": "field", + "name": "field1" + }, + { + "doc": "

an array of length @len

", + "kind": "field", + "name": "arr" + }, + { + "doc": "

the length of array

", + "kind": "field", + "name": "len" + } + ], + "kind": "class", + "methods": [], + "name": "AnnotationFields" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.AnnotationObject.json b/tests/scanner/Regress-1.0.json/Regress.AnnotationObject.json new file mode 100644 index 00000000..ba50c24f --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.AnnotationObject.json @@ -0,0 +1,584 @@ +{ + "constructors": [], + "doc": "

This is an object used to test annotations.

", + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "allow_none", + "parameters": [ + { + "allow_none": true, + "argname": "somearg", + "direction": "in", + "type": "const gchar*" + } + ], + "retval": { + "type": "GObject*" + } + }, + { + "doc": "

This is a test for out arguments; GObject defaults to transfer

", + "kind": "method", + "name": "calleeowns", + "parameters": [ + { + "allow_none": false, + "argname": "toown", + "direction": "out", + "type": "GObject**" + } + ], + "retval": { + "type": "gint" + } + }, + { + "doc": "

This is a test for out arguments, one transferred, other not

", + "kind": "method", + "name": "calleesowns", + "parameters": [ + { + "allow_none": false, + "argname": "toown1", + "direction": "out", + "type": "GObject**" + }, + { + "allow_none": false, + "argname": "toown2", + "direction": "out", + "type": "GObject**" + } + ], + "retval": { + "type": "gint" + } + }, + { + "doc": "

Test taking a zero-terminated array

", + "kind": "method", + "name": "compute_sum", + "parameters": [ + { + "allow_none": false, + "argname": "nums", + "direction": "in", + "type": "int*" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

Test taking an array with length parameter

", + "kind": "method", + "name": "compute_sum_n", + "parameters": [ + { + "allow_none": false, + "argname": "nums", + "direction": "in", + "type": "int*" + }, + { + "allow_none": false, + "argname": "n_nums", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

Test taking a zero-terminated array with length parameter

", + "kind": "method", + "name": "compute_sum_nz", + "parameters": [ + { + "allow_none": false, + "argname": "nums", + "direction": "in", + "type": "int*" + }, + { + "allow_none": false, + "argname": "n_nums", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

Test returning a caller-owned object

", + "kind": "method", + "name": "create_object", + "parameters": [], + "retval": { + "type": "GObject*" + } + }, + { + "doc": "", + "kind": "method", + "name": "do_not_use", + "parameters": [], + "retval": { + "type": "GObject*" + } + }, + { + "doc": "", + "kind": "method", + "name": "extra_annos", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "

Test taking a call-scoped callback

", + "kind": "method", + "name": "foreach", + "parameters": [ + { + "allow_none": false, + "argname": "func", + "direction": "in", + "type": "RegressAnnotationForeachFunc" + }, + { + "allow_none": false, + "argname": "user_data", + "direction": "in", + "type": "gpointer" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

This is a test for returning a hash table mapping strings to\nobjects.

", + "kind": "method", + "name": "get_hash", + "parameters": [], + "retval": { + "type": "GHashTable*" + } + }, + { + "doc": "

This is a test for returning a list of objects.\nThe list itself should be freed, but not the internal objects,\nintentionally similar example to gtk_container_get_children

", + "kind": "method", + "name": "get_objects", + "parameters": [], + "retval": { + "type": "GSList*" + } + }, + { + "doc": "

This is a test for returning a list of strings, where\neach string needs to be freed.

", + "kind": "method", + "name": "get_strings", + "parameters": [], + "retval": { + "type": "GList*" + } + }, + { + "doc": "", + "kind": "method", + "name": "hidden_self", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "

This is a test for in arguments

", + "kind": "method", + "name": "in", + "parameters": [ + { + "allow_none": false, + "argname": "inarg", + "direction": "in", + "type": "int*" + } + ], + "retval": { + "type": "gint" + } + }, + { + "doc": "

This is a test for out arguments

", + "kind": "method", + "name": "inout", + "parameters": [ + { + "allow_none": false, + "argname": "inoutarg", + "direction": "inout", + "type": "int*" + } + ], + "retval": { + "type": "gint" + } + }, + { + "doc": "

This is a second test for out arguments

", + "kind": "method", + "name": "inout2", + "parameters": [ + { + "allow_none": false, + "argname": "inoutarg", + "direction": "inout", + "type": "int*" + } + ], + "retval": { + "type": "gint" + } + }, + { + "doc": "

This is a 3th test for out arguments

", + "kind": "method", + "name": "inout3", + "parameters": [ + { + "allow_none": true, + "argname": "inoutarg", + "direction": "inout", + "type": "int*" + } + ], + "retval": { + "type": "gint" + } + }, + { + "doc": "", + "kind": "method", + "name": "method", + "parameters": [], + "retval": { + "type": "gint" + } + }, + { + "doc": "", + "kind": "method", + "name": "notrans", + "parameters": [], + "retval": { + "type": "GObject*" + } + }, + { + "doc": "

This is a test for out arguments

", + "kind": "method", + "name": "out", + "parameters": [ + { + "allow_none": false, + "argname": "outarg", + "direction": "out", + "type": "int*" + } + ], + "retval": { + "type": "gint" + } + }, + { + "doc": "

Test taking a zero-terminated array with length parameter

", + "kind": "method", + "name": "parse_args", + "parameters": [ + { + "allow_none": false, + "argname": "argc", + "direction": "inout", + "type": "int*" + }, + { + "allow_none": false, + "argname": "argv", + "direction": "inout", + "type": "char***" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

Test taking a guchar * with a length.

", + "kind": "method", + "name": "set_data", + "parameters": [ + { + "allow_none": false, + "argname": "data", + "direction": "in", + "type": "guchar*" + }, + { + "allow_none": false, + "argname": "length", + "direction": "in", + "type": "gsize" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

Test taking a gchar * with a length.

", + "kind": "method", + "name": "set_data2", + "parameters": [ + { + "allow_none": false, + "argname": "data", + "direction": "in", + "type": "gint8*" + }, + { + "allow_none": false, + "argname": "length", + "direction": "in", + "type": "gsize" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

Test taking a gchar * with a length, overriding the array element\ntype.

", + "kind": "method", + "name": "set_data3", + "parameters": [ + { + "allow_none": false, + "argname": "data", + "direction": "in", + "type": "guint8*" + }, + { + "allow_none": false, + "argname": "length", + "direction": "in", + "type": "gsize" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

Test returning a string as an out parameter

", + "kind": "method", + "name": "string_out", + "parameters": [ + { + "allow_none": false, + "argname": "str_out", + "direction": "out", + "type": "char**" + } + ], + "retval": { + "type": "gboolean" + } + }, + { + "doc": "", + "kind": "method", + "name": "use_buffer", + "parameters": [ + { + "allow_none": false, + "argname": "bytes", + "direction": "in", + "type": "guchar*" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

This is here just for the sake of being overriden by its\n.

", + "kind": "method", + "name": "watch", + "parameters": [ + { + "allow_none": false, + "argname": "func", + "direction": "in", + "type": "RegressAnnotationForeachFunc" + }, + { + "allow_none": false, + "argname": "user_data", + "direction": "in", + "type": "gpointer" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

Test overriding via the \"Rename To\" annotation.

", + "kind": "method", + "name": "watch_full", + "parameters": [ + { + "allow_none": false, + "argname": "func", + "direction": "in", + "type": "RegressAnnotationForeachFunc" + }, + { + "allow_none": false, + "argname": "user_data", + "direction": "in", + "type": "gpointer" + }, + { + "allow_none": false, + "argname": "destroy", + "direction": "in", + "type": "GDestroyNotify" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "with_voidp", + "parameters": [ + { + "allow_none": false, + "argname": "data", + "direction": "in", + "type": "void*" + } + ], + "retval": { + "type": "void" + } + } + ], + "name": "AnnotationObject", + "properties": [ + { + "doc": "", + "kind": "property", + "name": "function-property", + "type": "gpointer" + }, + { + "doc": "

This is a property which is a string

", + "kind": "property", + "name": "string-property", + "type": "gchar*" + }, + { + "doc": "

This is a property annotation intentionally indented with a mix\nof tabs and strings to test the tab handling capabilities of the scanner.

", + "kind": "property", + "name": "tab-property", + "type": "gchar*" + } + ], + "signals": [ + { + "doc": "

This signal tests a signal with attributes.

", + "kind": "signal", + "name": "attribute-signal", + "parameters": [ + { + "allow_none": false, + "argname": "arg1", + "direction": "in", + "type": "gchar*" + }, + { + "allow_none": false, + "argname": "arg2", + "direction": "in", + "type": "gchar*" + } + ], + "retval": { + "type": "gchar*" + } + }, + { + "doc": "

This signal tests an empty document argument (arg1)

", + "kind": "signal", + "name": "doc-empty-arg-parsing", + "parameters": [ + { + "allow_none": false, + "argname": "arg1", + "direction": "in", + "type": "gpointer" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

This is a signal which takes a list of strings, but it's not\nknown by GObject as it's only marked as G_TYPE_POINTER

", + "kind": "signal", + "name": "list-signal", + "parameters": [ + { + "allow_none": false, + "argname": "list", + "direction": "in", + "type": "gpointer" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

This is a signal which has a broken signal handler,\nit says it's pointer but it's actually a string.

", + "kind": "signal", + "name": "string-signal", + "parameters": [ + { + "allow_none": false, + "argname": "string", + "direction": "in", + "type": "gpointer" + } + ], + "retval": { + "type": "void" + } + } + ], + "vfuncs": [] +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.AnnotationObjectClass.json b/tests/scanner/Regress-1.0.json/Regress.AnnotationObjectClass.json new file mode 100644 index 00000000..bae95eb7 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.AnnotationObjectClass.json @@ -0,0 +1,14 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "parent_class" + } + ], + "kind": "class", + "methods": [], + "name": "AnnotationObjectClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.AnnotationStruct.json b/tests/scanner/Regress-1.0.json/Regress.AnnotationStruct.json new file mode 100644 index 00000000..d18969f5 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.AnnotationStruct.json @@ -0,0 +1,14 @@ +{ + "constructors": [], + "doc": "

This is a test of an array of object in an field of a struct.

", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "objects" + } + ], + "kind": "class", + "methods": [], + "name": "AnnotationStruct" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooASingle.json b/tests/scanner/Regress-1.0.json/Regress.FooASingle.json new file mode 100644 index 00000000..6b796b01 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooASingle.json @@ -0,0 +1,12 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "foo_some_single_enum" + } + ], + "name": "FooASingle" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooAddressType.json b/tests/scanner/Regress-1.0.json/Regress.FooAddressType.json new file mode 100644 index 00000000..30cc2a55 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooAddressType.json @@ -0,0 +1,22 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "invalid" + }, + { + "doc": "", + "kind": "default", + "name": "ipv4" + }, + { + "doc": "", + "kind": "default", + "name": "ipv6" + } + ], + "name": "FooAddressType" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooBRect.json b/tests/scanner/Regress-1.0.json/Regress.FooBRect.json new file mode 100644 index 00000000..4aab131a --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooBRect.json @@ -0,0 +1,59 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [ + { + "allow_none": false, + "argname": "x", + "direction": "in", + "type": "double" + }, + { + "allow_none": false, + "argname": "y", + "direction": "in", + "type": "double" + } + ], + "retval": { + "type": "RegressFooBRect*" + } + } + ], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "x" + }, + { + "doc": "", + "kind": "field", + "name": "y" + } + ], + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "add", + "parameters": [ + { + "allow_none": false, + "argname": "b2", + "direction": "in", + "type": "RegressFooBRect*" + } + ], + "retval": { + "type": "void" + } + } + ], + "name": "FooBRect" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooBoxed.json b/tests/scanner/Regress-1.0.json/Regress.FooBoxed.json new file mode 100644 index 00000000..b89073a8 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooBoxed.json @@ -0,0 +1,28 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [], + "retval": { + "type": "RegressFooBoxed*" + } + } + ], + "doc": "", + "fields": [], + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "method", + "parameters": [], + "retval": { + "type": "void" + } + } + ], + "name": "FooBoxed" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooBuffer.json b/tests/scanner/Regress-1.0.json/Regress.FooBuffer.json new file mode 100644 index 00000000..e3db76f1 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooBuffer.json @@ -0,0 +1,20 @@ +{ + "constructors": [], + "doc": "", + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "some_method", + "parameters": [], + "retval": { + "type": "void" + } + } + ], + "name": "FooBuffer", + "properties": [], + "signals": [], + "vfuncs": [] +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooBufferClass.json b/tests/scanner/Regress-1.0.json/Regress.FooBufferClass.json new file mode 100644 index 00000000..90d8e3ee --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooBufferClass.json @@ -0,0 +1,8 @@ +{ + "constructors": [], + "doc": "", + "fields": [], + "kind": "class", + "methods": [], + "name": "FooBufferClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooDBusData.json b/tests/scanner/Regress-1.0.json/Regress.FooDBusData.json new file mode 100644 index 00000000..de4ad7b8 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooDBusData.json @@ -0,0 +1,18 @@ +{ + "constructors": [], + "doc": "", + "fields": [], + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "method", + "parameters": [], + "retval": { + "type": "void" + } + } + ], + "name": "FooDBusData" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooEnumFullname.json b/tests/scanner/Regress-1.0.json/Regress.FooEnumFullname.json new file mode 100644 index 00000000..2cc1a907 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooEnumFullname.json @@ -0,0 +1,22 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "one" + }, + { + "doc": "", + "kind": "default", + "name": "two" + }, + { + "doc": "", + "kind": "default", + "name": "three" + } + ], + "name": "FooEnumFullname" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooEnumNoType.json b/tests/scanner/Regress-1.0.json/Regress.FooEnumNoType.json new file mode 100644 index 00000000..947c886c --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooEnumNoType.json @@ -0,0 +1,27 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "un" + }, + { + "doc": "", + "kind": "default", + "name": "deux" + }, + { + "doc": "", + "kind": "default", + "name": "trois" + }, + { + "doc": "", + "kind": "default", + "name": "neuf" + } + ], + "name": "FooEnumNoType" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooEnumType.json b/tests/scanner/Regress-1.0.json/Regress.FooEnumType.json new file mode 100644 index 00000000..63e11a15 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooEnumType.json @@ -0,0 +1,22 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "alpha" + }, + { + "doc": "", + "kind": "default", + "name": "beta" + }, + { + "doc": "", + "kind": "default", + "name": "delta" + } + ], + "name": "FooEnumType" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooError.json b/tests/scanner/Regress-1.0.json/Regress.FooError.json new file mode 100644 index 00000000..bd378d81 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooError.json @@ -0,0 +1,22 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "good" + }, + { + "doc": "", + "kind": "default", + "name": "bad" + }, + { + "doc": "", + "kind": "default", + "name": "ugly" + } + ], + "name": "FooError" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooEventAny.json b/tests/scanner/Regress-1.0.json/Regress.FooEventAny.json new file mode 100644 index 00000000..bbf44562 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooEventAny.json @@ -0,0 +1,14 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "send_event" + } + ], + "kind": "class", + "methods": [], + "name": "FooEventAny" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooEventExpose.json b/tests/scanner/Regress-1.0.json/Regress.FooEventExpose.json new file mode 100644 index 00000000..c9597173 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooEventExpose.json @@ -0,0 +1,19 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "send_event" + }, + { + "doc": "", + "kind": "field", + "name": "count" + } + ], + "kind": "class", + "methods": [], + "name": "FooEventExpose" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooForeignStruct.json b/tests/scanner/Regress-1.0.json/Regress.FooForeignStruct.json new file mode 100644 index 00000000..7842dc9e --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooForeignStruct.json @@ -0,0 +1,34 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [], + "retval": { + "type": "RegressFooForeignStruct*" + } + } + ], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "regress_foo" + } + ], + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "copy", + "parameters": [], + "retval": { + "type": "RegressFooForeignStruct*" + } + } + ], + "name": "FooForeignStruct" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooInterfaceIface.json b/tests/scanner/Regress-1.0.json/Regress.FooInterfaceIface.json new file mode 100644 index 00000000..2c7b2526 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooInterfaceIface.json @@ -0,0 +1,19 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "parent_iface" + }, + { + "doc": "", + "kind": "field", + "name": "do_regress_foo" + } + ], + "kind": "class", + "methods": [], + "name": "FooInterfaceIface" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooObject.json b/tests/scanner/Regress-1.0.json/Regress.FooObject.json new file mode 100644 index 00000000..006b8df3 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooObject.json @@ -0,0 +1,315 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [], + "retval": { + "type": "RegressFooObject*" + } + }, + { + "doc": "", + "kind": "constructor", + "name": "new_as_super", + "parameters": [], + "retval": { + "type": "GObject*" + } + } + ], + "doc": "", + "kind": "class", + "methods": [ + { + "doc": "

This shouldn't be scanned as a constructor.

", + "kind": "method", + "name": "append_new_stack_layer", + "parameters": [ + { + "allow_none": false, + "argname": "x", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "RegressFooOtherObject*" + } + }, + { + "doc": "", + "kind": "method", + "name": "dup_name", + "parameters": [], + "retval": { + "type": "char*" + } + }, + { + "doc": "", + "kind": "method", + "name": "external_type", + "parameters": [], + "retval": { + "type": "UtilityObject*" + } + }, + { + "doc": "", + "kind": "method", + "name": "get_name", + "parameters": [], + "retval": { + "type": "const char*" + } + }, + { + "doc": "", + "kind": "method", + "name": "handle_glyph", + "parameters": [ + { + "allow_none": false, + "argname": "glyph", + "direction": "in", + "type": "UtilityGlyph" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "is_it_time_yet", + "parameters": [ + { + "allow_none": false, + "argname": "time", + "direction": "in", + "type": "time_t" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

Not sure why this test is here...

", + "kind": "method", + "name": "new_cookie", + "parameters": [ + { + "allow_none": false, + "argname": "target", + "direction": "in", + "type": "const char*" + } + ], + "retval": { + "type": "RegressFooObjectCookie" + } + }, + { + "doc": "

Read some stuff.

", + "kind": "method", + "name": "read", + "parameters": [ + { + "allow_none": false, + "argname": "offset", + "direction": "in", + "type": "int" + }, + { + "allow_none": false, + "argname": "length", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

This is only useful from C.

", + "kind": "method", + "name": "skipped_method", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "take_all", + "parameters": [ + { + "allow_none": false, + "argname": "x", + "direction": "in", + "type": "int" + }, + { + "allow_none": false, + "argname": "...", + "direction": "in", + "type": "" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "various", + "parameters": [ + { + "allow_none": false, + "argname": "data", + "direction": "in", + "type": "void*" + }, + { + "allow_none": false, + "argname": "some_type", + "direction": "in", + "type": "GType" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "virtual_method", + "parameters": [ + { + "allow_none": false, + "argname": "first_param", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "gboolean" + } + }, + { + "doc": "", + "kind": "function", + "name": "a_global_method", + "parameters": [ + { + "allow_none": false, + "argname": "obj", + "direction": "in", + "type": "UtilityObject*" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

This function is intended to match clutter_stage_get_default which\nuses a C sugar return type.

", + "kind": "function", + "name": "get_default", + "parameters": [], + "retval": { + "type": "RegressFooObject*" + } + }, + { + "doc": "", + "kind": "function", + "name": "static_meth", + "parameters": [], + "retval": { + "type": "int" + } + } + ], + "name": "FooObject", + "properties": [ + { + "doc": "", + "kind": "property", + "name": "string", + "type": "gchar*" + } + ], + "signals": [ + { + "doc": "", + "kind": "signal", + "name": "signal", + "parameters": [ + { + "allow_none": false, + "argname": "object", + "direction": "in", + "type": "GObject" + }, + { + "allow_none": false, + "argname": "p0", + "direction": "in", + "type": "gpointer" + } + ], + "retval": { + "type": "gchar*" + } + } + ], + "vfuncs": [ + { + "doc": "

Read some stuff.

", + "kind": "vfunc", + "name": "read_fn", + "parameters": [ + { + "allow_none": false, + "argname": "offset", + "direction": "in", + "type": "int" + }, + { + "allow_none": false, + "argname": "length", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "vfunc", + "name": "virtual_method", + "parameters": [ + { + "allow_none": false, + "argname": "first_param", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "gboolean" + } + } + ] +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooObjectClass.json b/tests/scanner/Regress-1.0.json/Regress.FooObjectClass.json new file mode 100644 index 00000000..c9364e14 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooObjectClass.json @@ -0,0 +1,29 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "parent_class" + }, + { + "doc": "", + "kind": "field", + "name": "virtual_method" + }, + { + "doc": "", + "kind": "field", + "name": "read_fn" + }, + { + "doc": "", + "kind": "field", + "name": "_reserved" + } + ], + "kind": "class", + "methods": [], + "name": "FooObjectClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooOtherObject.json b/tests/scanner/Regress-1.0.json/Regress.FooOtherObject.json new file mode 100644 index 00000000..f0e278f9 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooOtherObject.json @@ -0,0 +1,10 @@ +{ + "constructors": [], + "doc": "", + "kind": "class", + "methods": [], + "name": "FooOtherObject", + "properties": [], + "signals": [], + "vfuncs": [] +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooOtherObjectClass.json b/tests/scanner/Regress-1.0.json/Regress.FooOtherObjectClass.json new file mode 100644 index 00000000..feca2459 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooOtherObjectClass.json @@ -0,0 +1,8 @@ +{ + "constructors": [], + "doc": "", + "fields": [], + "kind": "class", + "methods": [], + "name": "FooOtherObjectClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooRectangle.json b/tests/scanner/Regress-1.0.json/Regress.FooRectangle.json new file mode 100644 index 00000000..898738f5 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooRectangle.json @@ -0,0 +1,80 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "x" + }, + { + "doc": "", + "kind": "field", + "name": "y" + }, + { + "doc": "", + "kind": "field", + "name": "width" + }, + { + "doc": "", + "kind": "field", + "name": "height" + } + ], + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "add", + "parameters": [ + { + "allow_none": false, + "argname": "r2", + "direction": "in", + "type": "const RegressFooRectangle*" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

This is a C convenience constructor; we have to (skip)\nit because it's not a boxed type.

", + "kind": "function", + "name": "new", + "parameters": [ + { + "allow_none": false, + "argname": "x", + "direction": "in", + "type": "int" + }, + { + "allow_none": false, + "argname": "y", + "direction": "in", + "type": "int" + }, + { + "allow_none": false, + "argname": "width", + "direction": "in", + "type": "int" + }, + { + "allow_none": false, + "argname": "height", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "RegressFooRectangle*" + } + } + ], + "name": "FooRectangle" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooSkippable.json b/tests/scanner/Regress-1.0.json/Regress.FooSkippable.json new file mode 100644 index 00000000..36a33fbd --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooSkippable.json @@ -0,0 +1,17 @@ +{ + "doc": "

Some type that is only interesting from C and should not be\nexposed to language bindings.

", + "kind": "enum", + "members": [ + { + "doc": "

a skippable enum value

", + "kind": "default", + "name": "one" + }, + { + "doc": "

another skippable enum value

", + "kind": "default", + "name": "two" + } + ], + "name": "FooSkippable" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooStackLayer.json b/tests/scanner/Regress-1.0.json/Regress.FooStackLayer.json new file mode 100644 index 00000000..866eced4 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooStackLayer.json @@ -0,0 +1,52 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "desktop" + }, + { + "doc": "", + "kind": "default", + "name": "bottom" + }, + { + "doc": "", + "kind": "default", + "name": "normal" + }, + { + "doc": "", + "kind": "default", + "name": "top" + }, + { + "doc": "", + "kind": "default", + "name": "dock" + }, + { + "doc": "", + "kind": "default", + "name": "fullscreen" + }, + { + "doc": "", + "kind": "default", + "name": "focused_window" + }, + { + "doc": "", + "kind": "default", + "name": "override_redirect" + }, + { + "doc": "", + "kind": "default", + "name": "last" + } + ], + "name": "FooStackLayer" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooStruct.json b/tests/scanner/Regress-1.0.json/Regress.FooStruct.json new file mode 100644 index 00000000..f689b03c --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooStruct.json @@ -0,0 +1,19 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "priv" + }, + { + "doc": "", + "kind": "field", + "name": "member" + } + ], + "kind": "class", + "methods": [], + "name": "FooStruct" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooStructPrivate.json b/tests/scanner/Regress-1.0.json/Regress.FooStructPrivate.json new file mode 100644 index 00000000..1212bcd4 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooStructPrivate.json @@ -0,0 +1,8 @@ +{ + "constructors": [], + "doc": "", + "fields": [], + "kind": "class", + "methods": [], + "name": "FooStructPrivate" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooSubInterfaceIface.json b/tests/scanner/Regress-1.0.json/Regress.FooSubInterfaceIface.json new file mode 100644 index 00000000..4f32825f --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooSubInterfaceIface.json @@ -0,0 +1,29 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "parent_iface" + }, + { + "doc": "", + "kind": "field", + "name": "destroy_event" + }, + { + "doc": "", + "kind": "field", + "name": "do_bar" + }, + { + "doc": "", + "kind": "field", + "name": "do_baz" + } + ], + "kind": "class", + "methods": [], + "name": "FooSubInterfaceIface" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooSubobject.json b/tests/scanner/Regress-1.0.json/Regress.FooSubobject.json new file mode 100644 index 00000000..455f0716 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooSubobject.json @@ -0,0 +1,20 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [], + "retval": { + "type": "RegressFooSubobject*" + } + } + ], + "doc": "", + "kind": "class", + "methods": [], + "name": "FooSubobject", + "properties": [], + "signals": [], + "vfuncs": [] +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooSubobjectClass.json b/tests/scanner/Regress-1.0.json/Regress.FooSubobjectClass.json new file mode 100644 index 00000000..d0323d77 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooSubobjectClass.json @@ -0,0 +1,14 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "parent_class" + } + ], + "kind": "class", + "methods": [], + "name": "FooSubobjectClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooThingWithArray.json b/tests/scanner/Regress-1.0.json/Regress.FooThingWithArray.json new file mode 100644 index 00000000..50d85c43 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooThingWithArray.json @@ -0,0 +1,29 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "x" + }, + { + "doc": "", + "kind": "field", + "name": "y" + }, + { + "doc": "", + "kind": "field", + "name": "lines" + }, + { + "doc": "", + "kind": "field", + "name": "data" + } + ], + "kind": "class", + "methods": [], + "name": "FooThingWithArray" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.FooUtilityStruct.json b/tests/scanner/Regress-1.0.json/Regress.FooUtilityStruct.json new file mode 100644 index 00000000..2e3291a6 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.FooUtilityStruct.json @@ -0,0 +1,14 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "bar" + } + ], + "kind": "class", + "methods": [], + "name": "FooUtilityStruct" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.Intset.json b/tests/scanner/Regress-1.0.json/Regress.Intset.json new file mode 100644 index 00000000..66321dbe --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.Intset.json @@ -0,0 +1,8 @@ +{ + "constructors": [], + "doc": "

Like telepathy-glib's TpIntset.

", + "fields": [], + "kind": "class", + "methods": [], + "name": "Intset" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.LikeGnomeKeyringPasswordSchema.json b/tests/scanner/Regress-1.0.json/Regress.LikeGnomeKeyringPasswordSchema.json new file mode 100644 index 00000000..ac4b47e6 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.LikeGnomeKeyringPasswordSchema.json @@ -0,0 +1,24 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "dummy" + }, + { + "doc": "", + "kind": "field", + "name": "attributes" + }, + { + "doc": "", + "kind": "field", + "name": "dummy2" + } + ], + "kind": "class", + "methods": [], + "name": "LikeGnomeKeyringPasswordSchema" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.LikeXklConfigItem.json b/tests/scanner/Regress-1.0.json/Regress.LikeXklConfigItem.json new file mode 100644 index 00000000..6a2069a3 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.LikeXklConfigItem.json @@ -0,0 +1,31 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "name" + } + ], + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "set_name", + "parameters": [ + { + "allow_none": false, + "argname": "name", + "direction": "in", + "type": "const char*" + } + ], + "retval": { + "type": "void" + } + } + ], + "name": "LikeXklConfigItem" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.SkippedStructure.json b/tests/scanner/Regress-1.0.json/Regress.SkippedStructure.json new file mode 100644 index 00000000..65eae577 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.SkippedStructure.json @@ -0,0 +1,19 @@ +{ + "constructors": [], + "doc": "

This should be skipped, and moreover, all function which\nuse it should be.

", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "x" + }, + { + "doc": "", + "kind": "field", + "name": "v" + } + ], + "kind": "class", + "methods": [], + "name": "SkippedStructure" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestABCError.json b/tests/scanner/Regress-1.0.json/Regress.TestABCError.json new file mode 100644 index 00000000..f51bc345 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestABCError.json @@ -0,0 +1,22 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "code1" + }, + { + "doc": "", + "kind": "default", + "name": "code2" + }, + { + "doc": "", + "kind": "default", + "name": "code3" + } + ], + "name": "TestABCError" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestBoxed.json b/tests/scanner/Regress-1.0.json/Regress.TestBoxed.json new file mode 100644 index 00000000..f47f9b42 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestBoxed.json @@ -0,0 +1,123 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [], + "retval": { + "type": "RegressTestBoxed*" + } + }, + { + "doc": "", + "kind": "constructor", + "name": "new_alternative_constructor1", + "parameters": [ + { + "allow_none": false, + "argname": "i", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "RegressTestBoxed*" + } + }, + { + "doc": "", + "kind": "constructor", + "name": "new_alternative_constructor2", + "parameters": [ + { + "allow_none": false, + "argname": "i", + "direction": "in", + "type": "int" + }, + { + "allow_none": false, + "argname": "j", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "RegressTestBoxed*" + } + }, + { + "doc": "", + "kind": "constructor", + "name": "new_alternative_constructor3", + "parameters": [ + { + "allow_none": false, + "argname": "s", + "direction": "in", + "type": "char*" + } + ], + "retval": { + "type": "RegressTestBoxed*" + } + } + ], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "some_int8" + }, + { + "doc": "", + "kind": "field", + "name": "nested_a" + }, + { + "doc": "", + "kind": "field", + "name": "priv" + } + ], + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "_not_a_method", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "copy", + "parameters": [], + "retval": { + "type": "RegressTestBoxed*" + } + }, + { + "doc": "", + "kind": "method", + "name": "equals", + "parameters": [ + { + "allow_none": false, + "argname": "other", + "direction": "in", + "type": "RegressTestBoxed*" + } + ], + "retval": { + "type": "gboolean" + } + } + ], + "name": "TestBoxed" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestBoxedB.json b/tests/scanner/Regress-1.0.json/Regress.TestBoxedB.json new file mode 100644 index 00000000..96f8216f --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestBoxedB.json @@ -0,0 +1,52 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [ + { + "allow_none": false, + "argname": "some_int8", + "direction": "in", + "type": "gint8" + }, + { + "allow_none": false, + "argname": "some_long", + "direction": "in", + "type": "glong" + } + ], + "retval": { + "type": "RegressTestBoxedB*" + } + } + ], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "some_int8" + }, + { + "doc": "", + "kind": "field", + "name": "some_long" + } + ], + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "copy", + "parameters": [], + "retval": { + "type": "RegressTestBoxedB*" + } + } + ], + "name": "TestBoxedB" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestBoxedC.json b/tests/scanner/Regress-1.0.json/Regress.TestBoxedC.json new file mode 100644 index 00000000..9c0eb71f --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestBoxedC.json @@ -0,0 +1,29 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [], + "retval": { + "type": "RegressTestBoxedC*" + } + } + ], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "refcount" + }, + { + "doc": "", + "kind": "field", + "name": "another_thing" + } + ], + "kind": "class", + "methods": [], + "name": "TestBoxedC" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestBoxedD.json b/tests/scanner/Regress-1.0.json/Regress.TestBoxedD.json new file mode 100644 index 00000000..5416eaad --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestBoxedD.json @@ -0,0 +1,59 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [ + { + "allow_none": false, + "argname": "a_string", + "direction": "in", + "type": "const char*" + }, + { + "allow_none": false, + "argname": "a_int", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "RegressTestBoxedD*" + } + } + ], + "doc": "", + "fields": [], + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "copy", + "parameters": [], + "retval": { + "type": "RegressTestBoxedD*" + } + }, + { + "doc": "", + "kind": "method", + "name": "free", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "get_magic", + "parameters": [], + "retval": { + "type": "int" + } + } + ], + "name": "TestBoxedD" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestBoxedPrivate.json b/tests/scanner/Regress-1.0.json/Regress.TestBoxedPrivate.json new file mode 100644 index 00000000..079d8381 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestBoxedPrivate.json @@ -0,0 +1,8 @@ +{ + "constructors": [], + "doc": "", + "fields": [], + "kind": "class", + "methods": [], + "name": "TestBoxedPrivate" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestDEFError.json b/tests/scanner/Regress-1.0.json/Regress.TestDEFError.json new file mode 100644 index 00000000..16b48a94 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestDEFError.json @@ -0,0 +1,22 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "code0" + }, + { + "doc": "", + "kind": "default", + "name": "code1" + }, + { + "doc": "", + "kind": "default", + "name": "code2" + } + ], + "name": "TestDEFError" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestEnum.json b/tests/scanner/Regress-1.0.json/Regress.TestEnum.json new file mode 100644 index 00000000..0fd8761f --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestEnum.json @@ -0,0 +1,27 @@ +{ + "doc": "

By purpose, not all members have documentation

", + "kind": "enum", + "members": [ + { + "doc": "

value 1

", + "kind": "default", + "name": "value1" + }, + { + "doc": "

value 2

", + "kind": "default", + "name": "value2" + }, + { + "doc": "", + "kind": "default", + "name": "value3" + }, + { + "doc": "", + "kind": "default", + "name": "value4" + } + ], + "name": "TestEnum" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestEnumNoGEnum.json b/tests/scanner/Regress-1.0.json/Regress.TestEnumNoGEnum.json new file mode 100644 index 00000000..521e9988 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestEnumNoGEnum.json @@ -0,0 +1,22 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "evalue1" + }, + { + "doc": "", + "kind": "default", + "name": "evalue2" + }, + { + "doc": "", + "kind": "default", + "name": "evalue3" + } + ], + "name": "TestEnumNoGEnum" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestEnumUnsigned.json b/tests/scanner/Regress-1.0.json/Regress.TestEnumUnsigned.json new file mode 100644 index 00000000..e84a1069 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestEnumUnsigned.json @@ -0,0 +1,17 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "value1" + }, + { + "doc": "", + "kind": "default", + "name": "value2" + } + ], + "name": "TestEnumUnsigned" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestError.json b/tests/scanner/Regress-1.0.json/Regress.TestError.json new file mode 100644 index 00000000..f0c5ae36 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestError.json @@ -0,0 +1,22 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "code1" + }, + { + "doc": "", + "kind": "default", + "name": "code2" + }, + { + "doc": "", + "kind": "default", + "name": "code3" + } + ], + "name": "TestError" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestFloating.json b/tests/scanner/Regress-1.0.json/Regress.TestFloating.json new file mode 100644 index 00000000..e32866e0 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestFloating.json @@ -0,0 +1,20 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [], + "retval": { + "type": "RegressTestFloating*" + } + } + ], + "doc": "", + "kind": "class", + "methods": [], + "name": "TestFloating", + "properties": [], + "signals": [], + "vfuncs": [] +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestFloatingClass.json b/tests/scanner/Regress-1.0.json/Regress.TestFloatingClass.json new file mode 100644 index 00000000..3e9150fb --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestFloatingClass.json @@ -0,0 +1,14 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "parent_class" + } + ], + "kind": "class", + "methods": [], + "name": "TestFloatingClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestFundamentalObject.json b/tests/scanner/Regress-1.0.json/Regress.TestFundamentalObject.json new file mode 100644 index 00000000..70d54aae --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestFundamentalObject.json @@ -0,0 +1,48 @@ +{ + "constructors": [], + "doc": "", + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "ref", + "parameters": [], + "retval": { + "type": "RegressTestFundamentalObject*" + } + }, + { + "doc": "", + "kind": "method", + "name": "unref", + "parameters": [], + "retval": { + "type": "void" + } + } + ], + "name": "TestFundamentalObject", + "properties": [], + "signals": [], + "vfuncs": [ + { + "doc": "", + "kind": "vfunc", + "name": "copy", + "parameters": [], + "retval": { + "type": "RegressTestFundamentalObject*" + } + }, + { + "doc": "", + "kind": "vfunc", + "name": "finalize", + "parameters": [], + "retval": { + "type": "void" + } + } + ] +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestFundamentalObjectClass.json b/tests/scanner/Regress-1.0.json/Regress.TestFundamentalObjectClass.json new file mode 100644 index 00000000..75f6d5b9 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestFundamentalObjectClass.json @@ -0,0 +1,24 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "type_class" + }, + { + "doc": "", + "kind": "field", + "name": "copy" + }, + { + "doc": "", + "kind": "field", + "name": "finalize" + } + ], + "kind": "class", + "methods": [], + "name": "TestFundamentalObjectClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestFundamentalSubObject.json b/tests/scanner/Regress-1.0.json/Regress.TestFundamentalSubObject.json new file mode 100644 index 00000000..07710900 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestFundamentalSubObject.json @@ -0,0 +1,27 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [ + { + "allow_none": false, + "argname": "data", + "direction": "in", + "type": "const char*" + } + ], + "retval": { + "type": "RegressTestFundamentalSubObject*" + } + } + ], + "doc": "", + "kind": "class", + "methods": [], + "name": "TestFundamentalSubObject", + "properties": [], + "signals": [], + "vfuncs": [] +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestFundamentalSubObjectClass.json b/tests/scanner/Regress-1.0.json/Regress.TestFundamentalSubObjectClass.json new file mode 100644 index 00000000..fa8d3a02 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestFundamentalSubObjectClass.json @@ -0,0 +1,14 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "fundamental_object_class" + } + ], + "kind": "class", + "methods": [], + "name": "TestFundamentalSubObjectClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestInheritDrawable.json b/tests/scanner/Regress-1.0.json/Regress.TestInheritDrawable.json new file mode 100644 index 00000000..67790845 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestInheritDrawable.json @@ -0,0 +1,87 @@ +{ + "constructors": [], + "doc": "", + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "do_foo", + "parameters": [ + { + "allow_none": false, + "argname": "x", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "do_foo_maybe_throw", + "parameters": [ + { + "allow_none": false, + "argname": "x", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "get_origin", + "parameters": [ + { + "allow_none": false, + "argname": "x", + "direction": "out", + "type": "int*" + }, + { + "allow_none": false, + "argname": "y", + "direction": "out", + "type": "int*" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "get_size", + "parameters": [ + { + "allow_none": false, + "argname": "width", + "direction": "out", + "type": "guint*" + }, + { + "allow_none": false, + "argname": "height", + "direction": "out", + "type": "guint*" + } + ], + "retval": { + "type": "void" + } + } + ], + "name": "TestInheritDrawable", + "properties": [], + "signals": [], + "vfuncs": [] +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestInheritDrawableClass.json b/tests/scanner/Regress-1.0.json/Regress.TestInheritDrawableClass.json new file mode 100644 index 00000000..7577e64c --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestInheritDrawableClass.json @@ -0,0 +1,14 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "parent_class" + } + ], + "kind": "class", + "methods": [], + "name": "TestInheritDrawableClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestInheritPixmapObjectClass.json b/tests/scanner/Regress-1.0.json/Regress.TestInheritPixmapObjectClass.json new file mode 100644 index 00000000..947ab70f --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestInheritPixmapObjectClass.json @@ -0,0 +1,14 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "parent_class" + } + ], + "kind": "class", + "methods": [], + "name": "TestInheritPixmapObjectClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestInterfaceIface.json b/tests/scanner/Regress-1.0.json/Regress.TestInterfaceIface.json new file mode 100644 index 00000000..278fca2d --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestInterfaceIface.json @@ -0,0 +1,14 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "base_iface" + } + ], + "kind": "class", + "methods": [], + "name": "TestInterfaceIface" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestObj.json b/tests/scanner/Regress-1.0.json/Regress.TestObj.json new file mode 100644 index 00000000..574a785e --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestObj.json @@ -0,0 +1,866 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "constructor", + "parameters": [], + "retval": { + "type": "RegressTestObj*" + } + }, + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [ + { + "allow_none": false, + "argname": "obj", + "direction": "in", + "type": "RegressTestObj*" + } + ], + "retval": { + "type": "RegressTestObj*" + } + }, + { + "doc": "", + "kind": "constructor", + "name": "new_callback", + "parameters": [ + { + "allow_none": false, + "argname": "callback", + "direction": "in", + "type": "RegressTestCallbackUserData" + }, + { + "allow_none": false, + "argname": "user_data", + "direction": "in", + "type": "gpointer" + }, + { + "allow_none": false, + "argname": "notify", + "direction": "in", + "type": "GDestroyNotify" + } + ], + "retval": { + "type": "RegressTestObj*" + } + }, + { + "doc": "", + "kind": "constructor", + "name": "new_from_file", + "parameters": [ + { + "allow_none": false, + "argname": "x", + "direction": "in", + "type": "const char*" + } + ], + "retval": { + "type": "RegressTestObj*" + } + } + ], + "doc": "", + "kind": "class", + "methods": [ + { + "doc": "

This method is virtual. Notably its name differs from the virtual\nslot name, which makes it useful for testing bindings handle this\ncase.

", + "kind": "method", + "name": "do_matrix", + "parameters": [ + { + "allow_none": false, + "argname": "somestr", + "direction": "in", + "type": "const char*" + } + ], + "retval": { + "type": "int" + } + }, + { + "doc": "", + "kind": "method", + "name": "emit_sig_with_foreign_struct", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "emit_sig_with_int64", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "emit_sig_with_obj", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "emit_sig_with_uint64", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "forced_method", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "instance_method", + "parameters": [], + "retval": { + "type": "int" + } + }, + { + "doc": "", + "kind": "method", + "name": "instance_method_callback", + "parameters": [ + { + "allow_none": true, + "argname": "callback", + "direction": "in", + "type": "RegressTestCallback" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "method", + "name": "set_bare", + "parameters": [ + { + "allow_none": true, + "argname": "bare", + "direction": "in", + "type": "GObject*" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

Check that the out value is skipped

", + "kind": "method", + "name": "skip_inout_param", + "parameters": [ + { + "allow_none": false, + "argname": "a", + "direction": "in", + "type": "gint" + }, + { + "allow_none": false, + "argname": "out_b", + "direction": "out", + "type": "gint*" + }, + { + "allow_none": false, + "argname": "c", + "direction": "in", + "type": "gdouble" + }, + { + "allow_none": false, + "argname": "inout_d", + "direction": "inout", + "type": "gint*" + }, + { + "allow_none": false, + "argname": "out_sum", + "direction": "out", + "type": "gint*" + }, + { + "allow_none": false, + "argname": "num1", + "direction": "in", + "type": "gint" + }, + { + "allow_none": false, + "argname": "num2", + "direction": "in", + "type": "gint" + } + ], + "retval": { + "type": "gboolean" + } + }, + { + "doc": "

Check that the out value is skipped

", + "kind": "method", + "name": "skip_out_param", + "parameters": [ + { + "allow_none": false, + "argname": "a", + "direction": "in", + "type": "gint" + }, + { + "allow_none": false, + "argname": "out_b", + "direction": "out", + "type": "gint*" + }, + { + "allow_none": false, + "argname": "c", + "direction": "in", + "type": "gdouble" + }, + { + "allow_none": false, + "argname": "inout_d", + "direction": "inout", + "type": "gint*" + }, + { + "allow_none": false, + "argname": "out_sum", + "direction": "out", + "type": "gint*" + }, + { + "allow_none": false, + "argname": "num1", + "direction": "in", + "type": "gint" + }, + { + "allow_none": false, + "argname": "num2", + "direction": "in", + "type": "gint" + } + ], + "retval": { + "type": "gboolean" + } + }, + { + "doc": "

Check that a parameter is skipped

", + "kind": "method", + "name": "skip_param", + "parameters": [ + { + "allow_none": false, + "argname": "a", + "direction": "in", + "type": "gint" + }, + { + "allow_none": false, + "argname": "out_b", + "direction": "out", + "type": "gint*" + }, + { + "allow_none": false, + "argname": "c", + "direction": "in", + "type": "gdouble" + }, + { + "allow_none": false, + "argname": "inout_d", + "direction": "inout", + "type": "gint*" + }, + { + "allow_none": false, + "argname": "out_sum", + "direction": "out", + "type": "gint*" + }, + { + "allow_none": false, + "argname": "num1", + "direction": "in", + "type": "gint" + }, + { + "allow_none": false, + "argname": "num2", + "direction": "in", + "type": "gint" + } + ], + "retval": { + "type": "gboolean" + } + }, + { + "doc": "

Check that the return value is skipped

", + "kind": "method", + "name": "skip_return_val", + "parameters": [ + { + "allow_none": false, + "argname": "a", + "direction": "in", + "type": "gint" + }, + { + "allow_none": false, + "argname": "out_b", + "direction": "out", + "type": "gint*" + }, + { + "allow_none": false, + "argname": "c", + "direction": "in", + "type": "gdouble" + }, + { + "allow_none": false, + "argname": "inout_d", + "direction": "inout", + "type": "gint*" + }, + { + "allow_none": false, + "argname": "out_sum", + "direction": "out", + "type": "gint*" + }, + { + "allow_none": false, + "argname": "num1", + "direction": "in", + "type": "gint" + }, + { + "allow_none": false, + "argname": "num2", + "direction": "in", + "type": "gint" + } + ], + "retval": { + "type": "gboolean" + } + }, + { + "doc": "

Check that the return value is skipped. Succeed if a is nonzero, otherwise\nraise an error.

", + "kind": "method", + "name": "skip_return_val_no_out", + "parameters": [ + { + "allow_none": false, + "argname": "a", + "direction": "in", + "type": "gint" + } + ], + "retval": { + "type": "gboolean" + } + }, + { + "doc": "", + "kind": "method", + "name": "torture_signature_0", + "parameters": [ + { + "allow_none": false, + "argname": "x", + "direction": "in", + "type": "int" + }, + { + "allow_none": false, + "argname": "y", + "direction": "out", + "type": "double*" + }, + { + "allow_none": false, + "argname": "z", + "direction": "out", + "type": "int*" + }, + { + "allow_none": false, + "argname": "foo", + "direction": "in", + "type": "const char*" + }, + { + "allow_none": false, + "argname": "q", + "direction": "out", + "type": "int*" + }, + { + "allow_none": false, + "argname": "m", + "direction": "in", + "type": "guint" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

This function throws an error if m is odd.

", + "kind": "method", + "name": "torture_signature_1", + "parameters": [ + { + "allow_none": false, + "argname": "x", + "direction": "in", + "type": "int" + }, + { + "allow_none": false, + "argname": "y", + "direction": "out", + "type": "double*" + }, + { + "allow_none": false, + "argname": "z", + "direction": "out", + "type": "int*" + }, + { + "allow_none": false, + "argname": "foo", + "direction": "in", + "type": "const char*" + }, + { + "allow_none": false, + "argname": "q", + "direction": "out", + "type": "int*" + }, + { + "allow_none": false, + "argname": "m", + "direction": "in", + "type": "guint" + } + ], + "retval": { + "type": "gboolean" + } + }, + { + "doc": "", + "kind": "function", + "name": "null_out", + "parameters": [ + { + "allow_none": true, + "argname": "obj", + "direction": "out", + "type": "RegressTestObj**" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "function", + "name": "static_method", + "parameters": [ + { + "allow_none": false, + "argname": "x", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "double" + } + }, + { + "doc": "", + "kind": "function", + "name": "static_method_callback", + "parameters": [ + { + "allow_none": true, + "argname": "callback", + "direction": "in", + "type": "RegressTestCallback" + } + ], + "retval": { + "type": "void" + } + } + ], + "name": "TestObj", + "properties": [ + { + "doc": "", + "kind": "property", + "name": "bare", + "type": "GObject" + }, + { + "doc": "", + "kind": "property", + "name": "boxed", + "type": "RegressTestBoxed" + }, + { + "doc": "", + "kind": "property", + "name": "double", + "type": "gdouble" + }, + { + "doc": "", + "kind": "property", + "name": "float", + "type": "gfloat" + }, + { + "doc": "", + "kind": "property", + "name": "gtype", + "type": "GType" + }, + { + "doc": "", + "kind": "property", + "name": "hash-table", + "type": "" + }, + { + "doc": "", + "kind": "property", + "name": "hash-table-old", + "type": "" + }, + { + "doc": "", + "kind": "property", + "name": "int", + "type": "gint" + }, + { + "doc": "", + "kind": "property", + "name": "list", + "type": "gpointer" + }, + { + "doc": "", + "kind": "property", + "name": "list-old", + "type": "gpointer" + }, + { + "doc": "", + "kind": "property", + "name": "string", + "type": "gchar*" + } + ], + "signals": [ + { + "doc": "", + "kind": "signal", + "name": "all", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "signal", + "name": "cleanup", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "signal", + "name": "first", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "

This test signal similar to GSettings::change-event

", + "kind": "signal", + "name": "sig-with-array-len-prop", + "parameters": [ + { + "allow_none": true, + "argname": "arr", + "direction": "in", + "type": "guint*" + }, + { + "allow_none": false, + "argname": "len", + "direction": "in", + "type": "gint" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

This test signal is like TelepathyGlib's\n TpChannel:: group-members-changed-detailed:

", + "kind": "signal", + "name": "sig-with-array-prop", + "parameters": [ + { + "allow_none": false, + "argname": "arr", + "direction": "in", + "type": "guint*" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "signal", + "name": "sig-with-foreign-struct", + "parameters": [ + { + "allow_none": false, + "argname": "cr", + "direction": "in", + "type": "cairo_t" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

This test signal is like TelepathyGlib's\n TpAccount::status-changed

", + "kind": "signal", + "name": "sig-with-hash-prop", + "parameters": [ + { + "allow_none": false, + "argname": "hash", + "direction": "in", + "type": "" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

You can use this with regress_test_obj_emit_sig_with_int64, or raise from\nthe introspection client langage.

", + "kind": "signal", + "name": "sig-with-int64-prop", + "parameters": [ + { + "allow_none": false, + "argname": "i", + "direction": "in", + "type": "gint64" + } + ], + "retval": { + "type": "gint64" + } + }, + { + "doc": "", + "kind": "signal", + "name": "sig-with-intarray-ret", + "parameters": [ + { + "allow_none": false, + "argname": "i", + "direction": "in", + "type": "gint" + } + ], + "retval": { + "type": "gint*" + } + }, + { + "doc": "

Test transfer none GObject as a param (tests refcounting).\nUse with regress_test_obj_emit_sig_with_obj

", + "kind": "signal", + "name": "sig-with-obj", + "parameters": [ + { + "allow_none": false, + "argname": "obj", + "direction": "in", + "type": "GObject" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

Test GStrv as a param.

", + "kind": "signal", + "name": "sig-with-strv", + "parameters": [ + { + "allow_none": false, + "argname": "strs", + "direction": "in", + "type": "utf8*" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

You can use this with regress_test_obj_emit_sig_with_uint64, or raise from\nthe introspection client langage.

", + "kind": "signal", + "name": "sig-with-uint64-prop", + "parameters": [ + { + "allow_none": false, + "argname": "i", + "direction": "in", + "type": "guint64" + } + ], + "retval": { + "type": "guint64" + } + }, + { + "doc": "", + "kind": "signal", + "name": "test", + "parameters": [], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "signal", + "name": "test-with-static-scope-arg", + "parameters": [ + { + "allow_none": false, + "argname": "object", + "direction": "in", + "type": "RegressTestSimpleBoxedA" + } + ], + "retval": { + "type": "void" + } + } + ], + "vfuncs": [ + { + "doc": "", + "kind": "vfunc", + "name": "allow_none_vfunc", + "parameters": [ + { + "allow_none": true, + "argname": "two", + "direction": "in", + "type": "RegressTestObj*" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "vfunc", + "name": "complex_vfunc", + "parameters": [ + { + "allow_none": false, + "argname": "someint", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "

This method is virtual. Notably its name differs from the virtual\nslot name, which makes it useful for testing bindings handle this\ncase.

", + "kind": "vfunc", + "name": "matrix", + "parameters": [ + { + "allow_none": false, + "argname": "somestr", + "direction": "in", + "type": "const char*" + } + ], + "retval": { + "type": "int" + } + } + ] +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestObjClass.json b/tests/scanner/Regress-1.0.json/Regress.TestObjClass.json new file mode 100644 index 00000000..cfc3196d --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestObjClass.json @@ -0,0 +1,49 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "parent_class" + }, + { + "doc": "", + "kind": "field", + "name": "matrix" + }, + { + "doc": "", + "kind": "field", + "name": "allow_none_vfunc" + }, + { + "doc": "", + "kind": "field", + "name": "test_signal" + }, + { + "doc": "", + "kind": "field", + "name": "test_signal_with_static_scope_arg" + }, + { + "doc": "", + "kind": "field", + "name": "complex_vfunc" + }, + { + "doc": "", + "kind": "field", + "name": "_regress_reserved1" + }, + { + "doc": "", + "kind": "field", + "name": "_regress_reserved2" + } + ], + "kind": "class", + "methods": [], + "name": "TestObjClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestOtherError.json b/tests/scanner/Regress-1.0.json/Regress.TestOtherError.json new file mode 100644 index 00000000..b2a1704f --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestOtherError.json @@ -0,0 +1,22 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "code1" + }, + { + "doc": "", + "kind": "default", + "name": "code2" + }, + { + "doc": "", + "kind": "default", + "name": "code3" + } + ], + "name": "TestOtherError" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestPrivateStruct.json b/tests/scanner/Regress-1.0.json/Regress.TestPrivateStruct.json new file mode 100644 index 00000000..cffc2738 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestPrivateStruct.json @@ -0,0 +1,24 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "this_is_public_before" + }, + { + "doc": "", + "kind": "field", + "name": "this_is_private" + }, + { + "doc": "", + "kind": "field", + "name": "this_is_public_after" + } + ], + "kind": "class", + "methods": [], + "name": "TestPrivateStruct" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestReferenceEnum.json b/tests/scanner/Regress-1.0.json/Regress.TestReferenceEnum.json new file mode 100644 index 00000000..fb43978d --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestReferenceEnum.json @@ -0,0 +1,37 @@ +{ + "doc": "", + "kind": "enum", + "members": [ + { + "doc": "", + "kind": "default", + "name": "0" + }, + { + "doc": "", + "kind": "default", + "name": "1" + }, + { + "doc": "", + "kind": "default", + "name": "2" + }, + { + "doc": "", + "kind": "default", + "name": "3" + }, + { + "doc": "", + "kind": "default", + "name": "4" + }, + { + "doc": "", + "kind": "default", + "name": "5" + } + ], + "name": "TestReferenceEnum" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestSimpleBoxedA.json b/tests/scanner/Regress-1.0.json/Regress.TestSimpleBoxedA.json new file mode 100644 index 00000000..6114e349 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestSimpleBoxedA.json @@ -0,0 +1,64 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "some_int" + }, + { + "doc": "", + "kind": "field", + "name": "some_int8" + }, + { + "doc": "", + "kind": "field", + "name": "some_double" + }, + { + "doc": "", + "kind": "field", + "name": "some_enum" + } + ], + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "copy", + "parameters": [], + "retval": { + "type": "RegressTestSimpleBoxedA*" + } + }, + { + "doc": "", + "kind": "method", + "name": "equals", + "parameters": [ + { + "allow_none": false, + "argname": "other_a", + "direction": "in", + "type": "RegressTestSimpleBoxedA*" + } + ], + "retval": { + "type": "gboolean" + } + }, + { + "doc": "", + "kind": "function", + "name": "const_return", + "parameters": [], + "retval": { + "type": "const RegressTestSimpleBoxedA*" + } + } + ], + "name": "TestSimpleBoxedA" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestSimpleBoxedB.json b/tests/scanner/Regress-1.0.json/Regress.TestSimpleBoxedB.json new file mode 100644 index 00000000..8db557fb --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestSimpleBoxedB.json @@ -0,0 +1,29 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "some_int8" + }, + { + "doc": "", + "kind": "field", + "name": "nested_a" + } + ], + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "copy", + "parameters": [], + "retval": { + "type": "RegressTestSimpleBoxedB*" + } + } + ], + "name": "TestSimpleBoxedB" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestStructA.json b/tests/scanner/Regress-1.0.json/Regress.TestStructA.json new file mode 100644 index 00000000..bc891eab --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestStructA.json @@ -0,0 +1,68 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "some_int" + }, + { + "doc": "", + "kind": "field", + "name": "some_int8" + }, + { + "doc": "", + "kind": "field", + "name": "some_double" + }, + { + "doc": "", + "kind": "field", + "name": "some_enum" + } + ], + "kind": "class", + "methods": [ + { + "doc": "

Make a copy of a RegressTestStructA

", + "kind": "method", + "name": "clone", + "parameters": [ + { + "allow_none": false, + "argname": "a_out", + "direction": "out", + "type": "RegressTestStructA*" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "function", + "name": "parse", + "parameters": [ + { + "allow_none": false, + "argname": "a_out", + "direction": "out", + "type": "RegressTestStructA*" + }, + { + "allow_none": false, + "argname": "string", + "direction": "in", + "type": "const gchar*" + } + ], + "retval": { + "type": "void" + } + } + ], + "name": "TestStructA" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestStructB.json b/tests/scanner/Regress-1.0.json/Regress.TestStructB.json new file mode 100644 index 00000000..bf19168f --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestStructB.json @@ -0,0 +1,36 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "some_int8" + }, + { + "doc": "", + "kind": "field", + "name": "nested_a" + } + ], + "kind": "class", + "methods": [ + { + "doc": "

Make a copy of a RegressTestStructB

", + "kind": "method", + "name": "clone", + "parameters": [ + { + "allow_none": false, + "argname": "b_out", + "direction": "out", + "type": "RegressTestStructB*" + } + ], + "retval": { + "type": "void" + } + } + ], + "name": "TestStructB" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestStructC.json b/tests/scanner/Regress-1.0.json/Regress.TestStructC.json new file mode 100644 index 00000000..9a00e6cf --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestStructC.json @@ -0,0 +1,19 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "another_int" + }, + { + "doc": "", + "kind": "field", + "name": "obj" + } + ], + "kind": "class", + "methods": [], + "name": "TestStructC" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestStructD.json b/tests/scanner/Regress-1.0.json/Regress.TestStructD.json new file mode 100644 index 00000000..ba3c674f --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestStructD.json @@ -0,0 +1,34 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "array1" + }, + { + "doc": "", + "kind": "field", + "name": "array2" + }, + { + "doc": "", + "kind": "field", + "name": "field" + }, + { + "doc": "", + "kind": "field", + "name": "list" + }, + { + "doc": "", + "kind": "field", + "name": "garray" + } + ], + "kind": "class", + "methods": [], + "name": "TestStructD" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestStructE.json b/tests/scanner/Regress-1.0.json/Regress.TestStructE.json new file mode 100644 index 00000000..36fc98cf --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestStructE.json @@ -0,0 +1,19 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "some_type" + }, + { + "doc": "", + "kind": "field", + "name": "some_union" + } + ], + "kind": "class", + "methods": [], + "name": "TestStructE" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestStructF.json b/tests/scanner/Regress-1.0.json/Regress.TestStructF.json new file mode 100644 index 00000000..f2b3dc6e --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestStructF.json @@ -0,0 +1,44 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "ref_count" + }, + { + "doc": "", + "kind": "field", + "name": "data1" + }, + { + "doc": "", + "kind": "field", + "name": "data2" + }, + { + "doc": "", + "kind": "field", + "name": "data3" + }, + { + "doc": "", + "kind": "field", + "name": "data4" + }, + { + "doc": "", + "kind": "field", + "name": "data5" + }, + { + "doc": "", + "kind": "field", + "name": "data6" + } + ], + "kind": "class", + "methods": [], + "name": "TestStructF" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestStructFixedArray.json b/tests/scanner/Regress-1.0.json/Regress.TestStructFixedArray.json new file mode 100644 index 00000000..2811683d --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestStructFixedArray.json @@ -0,0 +1,29 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "just_int" + }, + { + "doc": "", + "kind": "field", + "name": "array" + } + ], + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "frob", + "parameters": [], + "retval": { + "type": "void" + } + } + ], + "name": "TestStructFixedArray" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestSubObj.json b/tests/scanner/Regress-1.0.json/Regress.TestSubObj.json new file mode 100644 index 00000000..b994d061 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestSubObj.json @@ -0,0 +1,39 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [], + "retval": { + "type": "RegressTestObj*" + } + } + ], + "doc": "", + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "instance_method", + "parameters": [], + "retval": { + "type": "int" + } + }, + { + "doc": "", + "kind": "method", + "name": "unset_bare", + "parameters": [], + "retval": { + "type": "void" + } + } + ], + "name": "TestSubObj", + "properties": [], + "signals": [], + "vfuncs": [] +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestSubObjClass.json b/tests/scanner/Regress-1.0.json/Regress.TestSubObjClass.json new file mode 100644 index 00000000..f2493784 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestSubObjClass.json @@ -0,0 +1,14 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "parent_class" + } + ], + "kind": "class", + "methods": [], + "name": "TestSubObjClass" +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestWi8021x.json b/tests/scanner/Regress-1.0.json/Regress.TestWi8021x.json new file mode 100644 index 00000000..cc658fee --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestWi8021x.json @@ -0,0 +1,69 @@ +{ + "constructors": [ + { + "doc": "", + "kind": "constructor", + "name": "new", + "parameters": [], + "retval": { + "type": "RegressTestWi8021x*" + } + } + ], + "doc": "", + "kind": "class", + "methods": [ + { + "doc": "", + "kind": "method", + "name": "get_testbool", + "parameters": [], + "retval": { + "type": "gboolean" + } + }, + { + "doc": "", + "kind": "method", + "name": "set_testbool", + "parameters": [ + { + "allow_none": false, + "argname": "v", + "direction": "in", + "type": "gboolean" + } + ], + "retval": { + "type": "void" + } + }, + { + "doc": "", + "kind": "function", + "name": "static_method", + "parameters": [ + { + "allow_none": false, + "argname": "x", + "direction": "in", + "type": "int" + } + ], + "retval": { + "type": "int" + } + } + ], + "name": "TestWi8021x", + "properties": [ + { + "doc": "", + "kind": "property", + "name": "testbool", + "type": "gboolean" + } + ], + "signals": [], + "vfuncs": [] +} \ No newline at end of file diff --git a/tests/scanner/Regress-1.0.json/Regress.TestWi8021xClass.json b/tests/scanner/Regress-1.0.json/Regress.TestWi8021xClass.json new file mode 100644 index 00000000..6e871ce8 --- /dev/null +++ b/tests/scanner/Regress-1.0.json/Regress.TestWi8021xClass.json @@ -0,0 +1,14 @@ +{ + "constructors": [], + "doc": "", + "fields": [ + { + "doc": "", + "kind": "field", + "name": "parent_class" + } + ], + "kind": "class", + "methods": [], + "name": "TestWi8021xClass" +} \ No newline at end of file -- cgit v1.2.1