From 5cd047131185932e937b05f6a77b9833028acbab Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Wed, 18 Jan 2012 14:09:47 -0800 Subject: [PATCH] scanner: Support documentation elements On Wed, 18 Jan 2012 12:29:37 -0800 "Kristensen, Kristian H" wrote: > Yeah, that looks good. I was thinking of a separate tag > to avoid stuffing too much into an attribute. How does this look? It adds a summary attribute to atomic elements, and a tag with a summary for others. Spits out enum documentation like this: /** * wl_display_error - global error values * @WL_DISPLAY_ERROR_INVALID_OBJECT: server couldn't find object * @WL_DISPLAY_ERROR_INVALID_METHOD: method doesn't exist on the specified interface * @WL_DISPLAY_ERROR_NO_MEMORY: server is out of memory * * These errors are global and can be emitted in response to any server request. */ enum wl_display_error { WL_DISPLAY_ERROR_INVALID_OBJECT = 0, WL_DISPLAY_ERROR_INVALID_METHOD = 1, WL_DISPLAY_ERROR_NO_MEMORY = 2, }; and structure documentation like this: /** * wl_display - core global object * @bind: bind an object to the display * @sync: (none) * * The core global object. This is a special singleton object. It is used for * internal wayland protocol features. */ struct wl_display_interface { void (*bind)(struct wl_client *client, struct wl_resource *resource, uint32_t name, const char *interface, uint32_t version, uint32_t id); void (*sync)(struct wl_client *client, struct wl_resource *resource, uint32_t callback); }; --- protocol/wayland.xml | 19 ++++++- src/scanner.c | 131 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 146 insertions(+), 4 deletions(-) diff --git a/protocol/wayland.xml b/protocol/wayland.xml index cdbbfd0c..8d911875 100644 --- a/protocol/wayland.xml +++ b/protocol/wayland.xml @@ -30,7 +30,13 @@ + + The core global object. This is a special singleton object. + It is used for internal wayland protocol features. + + + @@ -54,9 +60,16 @@ - - - + + These errors are global and can be emitted in response to any + server request. + + + +