diff options
author | Jesse Barnes <jesse.barnes@intel.com> | 2012-01-18 14:09:47 -0800 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-01-18 18:22:25 -0500 |
commit | 5cd047131185932e937b05f6a77b9833028acbab (patch) | |
tree | d4f1e603769a7ead60d4d07c0551398299305bae /protocol | |
parent | 4b5871e2b8be59b5dc3daa6fe00eb1bee80bfad6 (diff) |
scanner: Support documentation elements
On Wed, 18 Jan 2012 12:29:37 -0800
"Kristensen, Kristian H" <kristian.h.kristensen@intel.com> wrote:
> Yeah, that looks good. I was thinking of a separate <description> tag
> to avoid stuffing too much into an attribute.
How does this look? It adds a summary attribute to atomic elements,
and a <description> 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);
};
Diffstat (limited to 'protocol')
-rw-r--r-- | protocol/wayland.xml | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/protocol/wayland.xml b/protocol/wayland.xml index cdbbfd0..8d91187 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. --> <interface name="wl_display" version="1"> + <description summary="core global object"> + The core global object. This is a special singleton object. + It is used for internal wayland protocol features. + </description> <request name="bind"> + <description summary="bind an object to the display"> + </description> <arg name="name" type="uint"/> <arg name="interface" type="string"/> <arg name="version" type="uint"/> @@ -54,9 +60,16 @@ </event> <enum name="error"> - <entry name="invalid_object" value="0"/> - <entry name="invalid_method" value="1"/> - <entry name="no_memory" value="2"/> + <description summary="global error values"> + These errors are global and can be emitted in response to any + server request. + </description> + <entry name="invalid_object" value="0" + summary="server couldn't find object"/> + <entry name="invalid_method" value="1" + summary="method doesn't exist on the specified interface"/> + <entry name="no_memory" value="2" + summary="server is out of memory"/> </enum> <!-- Notify the client of global objects. These are objects that |