From d893890d1098953d6740d5c8114d278b6d9875fc Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Tue, 28 Aug 2012 00:11:40 +0200 Subject: Add documentation for enumeration members Enum members were Annotated in the AST, and most code already assumed they could have docs. What was missing was reading the docs from the comment blocks and writing them in the XML. https://bugzilla.gnome.org/show_bug.cgi?id=683046 --- tests/scanner/Annotation-1.0-expected.gir | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/scanner/Annotation-1.0-expected.gir') diff --git a/tests/scanner/Annotation-1.0-expected.gir b/tests/scanner/Annotation-1.0-expected.gir index 2ea6c544..73d982dd 100644 --- a/tests/scanner/Annotation-1.0-expected.gir +++ b/tests/scanner/Annotation-1.0-expected.gir @@ -17,8 +17,10 @@ and/or use gtk-doc annotations. --> c:identifier-prefixes="Annotation" c:symbol-prefixes="annotation"> - - + + + + Date: Thu, 31 Jan 2013 21:42:32 -0500 Subject: giscanner: Apply standard annotations to constant values While there's no particular reason I need to do this, there really isn't any reason to not do this, and it helps with doctool or whatever in the future if we want to document when a constant showed up. g-ir-compiler also keeps track of constant deprecations, so this fixes constants not ever being deprecated. https://bugzilla.gnome.org/show_bug.cgi?id=693040 --- tests/scanner/Annotation-1.0-expected.gir | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/scanner/Annotation-1.0-expected.gir') diff --git a/tests/scanner/Annotation-1.0-expected.gir b/tests/scanner/Annotation-1.0-expected.gir index 73d982dd..0be91d6d 100644 --- a/tests/scanner/Annotation-1.0-expected.gir +++ b/tests/scanner/Annotation-1.0-expected.gir @@ -29,12 +29,15 @@ and/or use gtk-doc annotations. --> + c:type="ANNOTATION_CALCULATED_LARGE" + version="1.4"> + Constant to define a calculated large value + Constant to define a calculated large value -- cgit v1.2.1 From 9c0bd59b021e163eae191db95ce6beeb389cbd6f Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Thu, 31 Jan 2013 09:36:07 -0500 Subject: girparser: Serialize and read back the instance_parameter g-ir-doc-tool wants to use the instance parameter to read docs and the parameter name, so it needs to be shuttled through the GIR. https://bugzilla.gnome.org/show_bug.cgi?id=693040 --- tests/scanner/Annotation-1.0-expected.gir | 136 ++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) (limited to 'tests/scanner/Annotation-1.0-expected.gir') diff --git a/tests/scanner/Annotation-1.0-expected.gir b/tests/scanner/Annotation-1.0-expected.gir index 0be91d6d..bc0ae090 100644 --- a/tests/scanner/Annotation-1.0-expected.gir +++ b/tests/scanner/Annotation-1.0-expected.gir @@ -114,6 +114,10 @@ and/or use gtk-doc annotations. --> + + a #GObject + + @@ -126,6 +130,10 @@ and/or use gtk-doc annotations. --> + + a #GObject + + + + a #GObject + + + + a #GObject + + Sequence of numbers @@ -179,6 +195,10 @@ and/or use gtk-doc annotations. --> + + a #GObject + + Sequence of numbers that are zero-terminated @@ -198,6 +218,10 @@ and/or use gtk-doc annotations. --> + + a #AnnotationObject + + Sequence of numbers that are zero-terminated @@ -217,6 +241,12 @@ and/or use gtk-doc annotations. --> The object + + + a #GObject + + + %NULL always + + + a #GObject + + + + + + + + Test taking a call-scoped callback @@ -239,6 +280,10 @@ and/or use gtk-doc annotations. --> + + a #AnnotationObject + + + + + a #GObject + + + This is a test for returning a list of objects. @@ -273,6 +324,12 @@ intentionally similar example to gtk_container_get_children + + + a #GObject + + + This is a test for returning a list of strings, where @@ -283,11 +340,23 @@ each string needs to be freed. + + + a #GObject + + + + + + A #AnnotationObject + + + This is a test for in arguments @@ -296,6 +365,10 @@ each string needs to be freed. + + a #GObject + + This is an argument test @@ -309,6 +382,10 @@ each string needs to be freed. + + a #GObject + + + + a #GObject + + + + a #GObject + + an int + + + a #GObject + + + An object, not referenced + + + a #GObject + + + This is a test for out arguments @@ -370,6 +467,10 @@ each string needs to be freed. + + a #GObject + + + + a #AnnotationObject + + + + a #AnnotationObject + + The data @@ -427,6 +536,10 @@ each string needs to be freed. + + a #AnnotationObject + + The data @@ -446,6 +559,10 @@ type. + + a #AnnotationObject + + The data @@ -465,6 +582,10 @@ type. + + a #AnnotationObject + + + + a #GObject + + @@ -494,6 +619,10 @@ annotation_object_watch_full(). + + A #AnnotationObject + + The callback @@ -512,6 +641,10 @@ annotation_object_watch_full(). + + A #AnnotationObject + + + + + Opaque pointer handle -- cgit v1.2.1 From 3209fdf04bdff42033e1f833913c394adcaa2e67 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Fri, 1 Feb 2013 00:17:39 -0500 Subject: ast: Make sure to export c:type for signals and properties --- tests/scanner/Annotation-1.0-expected.gir | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'tests/scanner/Annotation-1.0-expected.gir') diff --git a/tests/scanner/Annotation-1.0-expected.gir b/tests/scanner/Annotation-1.0-expected.gir index bc0ae090..3abec0e3 100644 --- a/tests/scanner/Annotation-1.0-expected.gir +++ b/tests/scanner/Annotation-1.0-expected.gir @@ -681,7 +681,7 @@ annotation_object_watch_full(). writable="1" construct="1" transfer-ownership="none"> - + construct="1" transfer-ownership="none"> This is a property which is a string - + transfer-ownership="none"> This is a property annotation intentionally indented with a mix of tabs and strings to test the tab handling capabilities of the scanner. - + @@ -710,29 +710,29 @@ of tabs and strings to test the tab handling capabilities of the scanner. the return value - + a value - + another value - + This signal tests an empty document argument (@arg1) - + - + @@ -740,12 +740,12 @@ of tabs and strings to test the tab handling capabilities of the scanner. This is a signal which takes a list of strings, but it's not known by GObject as it's only marked as G_TYPE_POINTER - + a list of strings - + @@ -759,12 +759,12 @@ known by GObject as it's only marked as G_TYPE_POINTER This is a signal which has a broken signal handler, it says it's pointer but it's actually a string. - + a string - + -- cgit v1.2.1 From 2df621c53cdffbc3c43c3745947ee859020c8338 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sat, 2 Feb 2013 11:49:48 -0500 Subject: tests: Move Annotation into Regress The goal here is to have one master library for testing lots of edge cases for GIRs rather than lots of individual libraries. https://bugzilla.gnome.org/show_bug.cgi?id=693097 --- tests/scanner/Annotation-1.0-expected.gir | 994 ------------------------------ 1 file changed, 994 deletions(-) delete mode 100644 tests/scanner/Annotation-1.0-expected.gir (limited to 'tests/scanner/Annotation-1.0-expected.gir') diff --git a/tests/scanner/Annotation-1.0-expected.gir b/tests/scanner/Annotation-1.0-expected.gir deleted file mode 100644 index 3abec0e3..00000000 --- a/tests/scanner/Annotation-1.0-expected.gir +++ /dev/null @@ -1,994 +0,0 @@ - - - - - - - - - - - - - - - - - - - - Constant to define a calculated large value - - - - Constant to define a calculated large value - - - - This is a callback. - - array of ints - - - - - array of ints - - - - - - - - - - - - - - - - - - - - - - This is a callback taking a list. - - list of strings - - - - - - - list of strings - - - - - - - - This is a callback with a 'closure' argument that is not named -'user_data' and hence has to be annotated. - - - - - - The user data - - - - - - - This is an object used to test annotations. - - - %NULL always - - - - - a #GObject - - - - - - - - - This is a test for out arguments; GObject defaults to transfer - - an int - - - - - a #GObject - - - - a #GObject - - - - - - This is a test for out arguments, one transferred, other not - - an int - - - - - a #GObject - - - - a #GObject - - - - a #GObject - - - - - - Test taking a zero-terminated array - - - - - - a #GObject - - - - Sequence of numbers - - - - - - - - Test taking an array with length parameter - - - - - - a #GObject - - - - Sequence of numbers that are zero-terminated - - - - - - Length of number array - - - - - - Test taking a zero-terminated array with length parameter - - - - - - a #AnnotationObject - - - - Sequence of numbers that are zero-terminated - - - - - - Length of number array - - - - - - Test returning a caller-owned object - - The object - - - - - a #GObject - - - - - - - %NULL always - - - - - a #GObject - - - - - - - - - - - - - - - - - Test taking a call-scoped callback - - - - - - a #AnnotationObject - - - - Callback to invoke - - - - Callback user data - - - - - - This is a test for returning a hash table mapping strings to -objects. - - hash table - - - - - - - - a #GObject - - - - - - This is a test for returning a list of objects. -The list itself should be freed, but not the internal objects, -intentionally similar example to gtk_container_get_children - - list of objects - - - - - - - a #GObject - - - - - - This is a test for returning a list of strings, where -each string needs to be freed. - - list of strings - - - - - - - a #GObject - - - - - - - - - - - A #AnnotationObject - - - - - - This is a test for in arguments - - an int - - - - - a #GObject - - - - This is an argument test - - - - - - This is a test for out arguments - - an int - - - - - a #GObject - - - - This is an argument test - - - - - - This is a second test for out arguments - - an int - - - - - a #GObject - - - - This is an argument test - - - - - - This is a 3th test for out arguments - - an int - - - - - a #GObject - - - - This is an argument test - - - - - - - an int - - - - - a #GObject - - - - - - - An object, not referenced - - - - - a #GObject - - - - - - This is a test for out arguments - - an int - - - - - a #GObject - - - - This is an argument test - - - - - - Test taking a zero-terminated array with length parameter - - - - - - a #AnnotationObject - - - - Length of the argument vector - - - - Argument vector - - - - - - - - Test taking a guchar * with a length. - - - - - - a #AnnotationObject - - - - The data - - - - - - Length of the data - - - - - - Test taking a gchar * with a length. - - - - - - a #AnnotationObject - - - - The data - - - - - - Length of the data - - - - - - Test taking a gchar * with a length, overriding the array element -type. - - - - - - a #AnnotationObject - - - - The data - - - - - - Length of the data - - - - - - Test returning a string as an out parameter - - some boolean - - - - - a #AnnotationObject - - - - string return value - - - - - - - - - - - a #GObject - - - - - - - - - This is here just for the sake of being overriden by its -annotation_object_watch_full(). - - - - - - A #AnnotationObject - - - - The callback - - - - The callback data - - - - - - Test overriding via the "Rename To" annotation. - - - - - - A #AnnotationObject - - - - The callback - - - - The callback data - - - - Destroy notification - - - - - - - - - - - - - - Opaque pointer handle - - - - - - - - - This is a property which is a string - - - - This is a property annotation intentionally indented with a mix -of tabs and strings to test the tab handling capabilities of the scanner. - - - - - - - This signal tests a signal with attributes. - - - the return value - - - - - - a value - - - - - another value - - - - - - This signal tests an empty document argument (@arg1) - - - - - - - - - - - This is a signal which takes a list of strings, but it's not -known by GObject as it's only marked as G_TYPE_POINTER - - - - - - a list of strings - - - - - - - - This is a signal which has a broken signal handler, -it says it's pointer but it's actually a string. - - - - - - a string - - - - - - - - - - - - This is a test of an array of object in an field of a struct. - - - - - - - - - - - The return value. - - - - - A #AnnotationObject. - - - - - - Some data. - - - - - - Test messing up the heuristic of closure/destroy-notification -detection, and fixing it via annotations. - - - - - - Destroy notification - - - - - - - - - - - - - Source file - - - - - - - - - - The number of args. - - - - The arguments. - - - - - - - - - - - - - some text (e.g. example) or else - - - - - - - - - - - the array - - - - - - - - - The return value - - - - - - - Number of return values - - - - - - - An annotated filename - - - - - - - - - - Source file - - - - - - Explicitly test having a space after the ** here. - - - - - - - - - - - - - - - - - - - - - - The return value - - - - - - - - - - - - - - - - - - - See https://bugzilla.gnome.org/show_bug.cgi?id=630862 - - An object, note the colon:in here - - - - - - A floating object - - - - - - - - - - -- cgit v1.2.1