编辑节文件(section file)
节文件用于组织由GTK-Doc输出的文档。在此你指定哪个符号属于哪个类或模块,并控制它是否可见(公共的或私有的)。
The section file is a plain text file with tags delimiting sections. Blank lines are ignored and lines starting with a '#' are treated as comment lines.
While the tags make the file look like xml, it is not. Please do not close tags like <SUBSECTION>.
<INCLUDE>libmeep/meep.h</INCLUDE> <SECTION> <FILE>meepapp</FILE> <TITLE>MeepApp</TITLE> MeepApp <SUBSECTION Standard> MEEP_APP ... MeepAppClass meep_app_get_type </SECTION>
The <FILE> ... </FILE> tag is used to specify the file name, without any suffix. For example, using '<FILE>gnome-config</FILE>' will result in the section declarations being output in the template file tmpl/gnome-config.sgml, which will be converted into the DocBook XML file xml/gnome-config.sgml or the DocBook XML file xml/gnome-config.xml. (The name of the HTML file is based on the module name and the section title, or for GObjects it is based on the GObjects class name converted to lower case).
<TITLE> ... </TITLE>标记用于节的标题。它只在模板(如果使用的话)最初创建之前有用,因为设置在模板文件内的标题覆盖了它。或者如果你在源代码中使用了SECTION注释(此功能已过时)。
You can group items in the section by using the <SUBSECTION> tag. Currently it outputs a blank line between subsections in the synopsis section. You can also use <SUBSECTION Standard> for standard GObject declarations (e.g. the functions like g_object_get_type and macros like G_OBJECT(), G_IS_OBJECT() etc.). Currently these are left out of the documentation. You can also use <SUBSECTION Private> for private declarations which will not be output (it is a handy way to avoid warning messages about unused declarations). If your library contains private types which you don't want to appear in the object hierarchy and the list of implemented or required interfaces, add them to a Private subsection. Whether you would place GObject and GObjectClass like structs in public or Standard section depends if they have public entries (variables, vmethods).
You can also use <INCLUDE> ... </INCLUDE> to specify the #include files which are shown in the synopsis sections. It contains a comma-separate list of #include files, without the angle brackets. If you set it outside of any sections, it acts for all sections until the end of the file. If you set it within a section, it only applies to that section.