doc/xsl: include static inline functions

When generating documentation, xmllint complained:

  element link: validity error : IDREF attribute linkend references an
  unknown ID "Server-structwl__signal_1afe73f44f7f1b517c9c0ba90829c93309"

  element link: validity error : IDREF attribute linkend references an
  unknown ID "Server-structwl__signal_1afe73f44f7f1b517c9c0ba90829c93309"

  element link: validity error : IDREF attribute linkend references an
  unknown ID "Server-structwl__signal_1aa8bcd3b8e250cfe35ed064d5af589096"

These were referring to wl_signal_add() and wl_signal_emit() I think,
which are static inlines in a public header.

The XSLT ignored static functions, probably assuming that they cannot be
public API. Internal (static) functions are present in the Doxygen XML,
so they do need to be excluded. Now we include static functions if their
body is in a header. We de not scan private headers, so they must be
public API.

Comparing the final generated HTML documentation, these functions are
added to both Client and Server APIs:

  wl_fixed_to_double
  wl_fixed_from_double
  wl_fixed_to_int
  wl_fixed_from_int

These functions are added to the Server API:

  wl_signal_init
  wl_signal_add
  wl_signal_get
  wl_signal_emit

Signed-off-by: Pekka Paalanen <pq@iki.fi>
This commit is contained in:
Pekka Paalanen 2025-12-28 11:25:31 +02:00
parent 256f853261
commit da2e9b5c63

View file

@ -101,8 +101,16 @@
<!-- methods --> <!-- methods -->
<xsl:template match="memberdef" > <xsl:template match="memberdef" >
<xsl:if test="@kind = 'function' and @static = 'no' and @prot = 'public' or <xsl:if test="(@kind = 'function' and
@kind !='function' and normalize-space(briefdescription) != ''"> (@static = 'no' or
substring(location/@bodyfile,
string-length(location/@bodyfile) - 1,
1000) = '.h'
)
and @prot = 'public'
)
or
(@kind != 'function' and normalize-space(briefdescription) != '')">
<varlistentry id="{$which}-{@id}"> <varlistentry id="{$which}-{@id}">
<term> <term>
<xsl:value-of select="name"/> <xsl:value-of select="name"/>