Commit 6e1570da authored by Rico Tzschichholz's avatar Rico Tzschichholz

libvaladoc: Avoid superfluous references of MarkupWriter

parent 4b4044fc
......@@ -39,7 +39,7 @@ public class Valadoc.Devhelp.MarkupWriter : Valadoc.MarkupWriter {
|| name == "sub";
}
public MarkupWriter start_book (string title, string lang, string link, string name, string version, string author) {
public unowned MarkupWriter start_book (string title, string lang, string link, string name, string version, string author) {
this.start_tag ("book", {"xmlns", "http://www.devhelp.net/book",
"title", title,
"language", lang,
......@@ -50,42 +50,42 @@ public class Valadoc.Devhelp.MarkupWriter : Valadoc.MarkupWriter {
return this;
}
public MarkupWriter end_book () {
public unowned MarkupWriter end_book () {
this.end_tag ("book");
return this;
}
public MarkupWriter start_functions () {
public unowned MarkupWriter start_functions () {
this.start_tag ("functions");
return this;
}
public MarkupWriter end_functions () {
public unowned MarkupWriter end_functions () {
this.end_tag ("functions");
return this;
}
public MarkupWriter start_chapters () {
public unowned MarkupWriter start_chapters () {
this.start_tag ("chapters");
return this;
}
public MarkupWriter end_chapters () {
public unowned MarkupWriter end_chapters () {
this.end_tag ("chapters");
return this;
}
public MarkupWriter start_sub (string name, string link) {
public unowned MarkupWriter start_sub (string name, string link) {
this.start_tag ("sub", {"name", name, "link", link});
return this;
}
public MarkupWriter end_sub () {
public unowned MarkupWriter end_sub () {
this.end_tag ("sub");
return this;
}
public MarkupWriter keyword (string name, string type, string link) {
public unowned MarkupWriter keyword (string name, string type, string link) {
this.start_tag ("keyword", {"type", type, "name", name, "link", link});
this.end_tag ("keyword");
return this;
......
......@@ -43,7 +43,7 @@ public class Valadoc.Html.MarkupWriter : Valadoc.MarkupWriter {
}, xml_declaration);
}
public MarkupWriter add_usemap (Charts.Chart chart) {
public unowned MarkupWriter add_usemap (Charts.Chart chart) {
string? buf = (string?) chart.write_buffer ("cmapx");
if (buf != null) {
raw_text ("\n");
......@@ -54,7 +54,7 @@ public class Valadoc.Html.MarkupWriter : Valadoc.MarkupWriter {
}
// edit
public MarkupWriter link (string url, string label, string? css_class = null) {
public unowned MarkupWriter link (string url, string label, string? css_class = null) {
if (css_class == null) {
start_tag ("a", {"href", url});
} else {
......@@ -66,7 +66,7 @@ public class Valadoc.Html.MarkupWriter : Valadoc.MarkupWriter {
return this;
}
public MarkupWriter image (string src, string? caption = null, string? css_class = null) {
public unowned MarkupWriter image (string src, string? caption = null, string? css_class = null) {
if (css_class == null) {
simple_tag ("img", {"src", src, "alt", caption});
} else {
......@@ -75,12 +75,12 @@ public class Valadoc.Html.MarkupWriter : Valadoc.MarkupWriter {
return this;
}
public MarkupWriter stylesheet_link (string url) {
public unowned MarkupWriter stylesheet_link (string url) {
simple_tag ("link", {"href", url, "rel", "stylesheet", "type", "text/css"});
return this;
}
public MarkupWriter javascript_link (string url) {
public unowned MarkupWriter javascript_link (string url) {
start_tag ("script", {"src", url, "type", "text/javascript"});
end_tag ("script");
return this;
......
......@@ -109,7 +109,7 @@ public class Valadoc.MarkupWriter {
* @param attributes a list of name/value pairs
* @return this
*/
public MarkupWriter start_tag (string name, string[]? attributes=null) {
public unowned MarkupWriter start_tag (string name, string[]? attributes=null) {
indent++;
check_column (name);
......@@ -139,7 +139,7 @@ public class Valadoc.MarkupWriter {
* @param attributes a list of name/value pairs
* @return this
*/
public MarkupWriter simple_tag (string name, string[]? attributes=null) {
public unowned MarkupWriter simple_tag (string name, string[]? attributes=null) {
indent++;
check_column (name);
......@@ -169,7 +169,7 @@ public class Valadoc.MarkupWriter {
* @param name the name of the markup
* @return this
*/
public MarkupWriter end_tag (string name) {
public unowned MarkupWriter end_tag (string name) {
check_column (name, true);
do_write ("</%s>".printf (name));
indent--;
......@@ -183,7 +183,7 @@ public class Valadoc.MarkupWriter {
* @see raw_text
* @return this
*/
public MarkupWriter text (string text) {
public unowned MarkupWriter text (string text) {
if (wrap && text.length + current_column > MAX_COLUMN) {
long wrote = 0;
while (wrote < text.length) {
......@@ -223,7 +223,7 @@ public class Valadoc.MarkupWriter {
* @see text
* @return this
*/
public MarkupWriter raw_text (string text) {
public unowned MarkupWriter raw_text (string text) {
do_write (text);
last_was_tag = false;
return this;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment