From: Florian Brosch Date: Wed, 28 Jan 2009 02:37:06 +0000 (+0000) Subject: - new html-doclet (based on devhelp-doclet) - cleanups (rm linkhelpers, X-Git-Tag: 0.37.1~3^2~606 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4452be14618bd60fbe41133d0e24b50b2176ae2;p=thirdparty%2Fvala.git - new html-doclet (based on devhelp-doclet) - cleanups (rm linkhelpers, - new html-doclet (based on devhelp-doclet) - cleanups (rm linkhelpers, mysql-vapi) - new icons (Frederik Zipp) - valac-0.5.6 svn path=/trunk/; revision=28 --- diff --git a/configure.in b/configure.in index 38ac4eee9..7e9c053e5 100644 --- a/configure.in +++ b/configure.in @@ -74,31 +74,30 @@ AC_CONFIG_FILES([Makefile src/vapi/Makefile src/doclets/Makefile src/doclets/htmlhelpers/Makefile - src/doclets/html/Makefile - src/doclets/html/linkhelper/Makefile - src/doclets/html/doclet/Makefile - src/doclets/html/deps/Makefile - src/doclets/html/taglets/Makefile - src/doclets/html/taglets/parameter/Makefile - src/doclets/html/taglets/version/Makefile - src/doclets/html/taglets/throws/Makefile - src/doclets/html/taglets/return/Makefile - src/doclets/html/taglets/string/Makefile - src/doclets/html/taglets/wikilink/Makefile - src/doclets/html/taglets/image/Makefile - src/doclets/html/taglets/link/Makefile - src/doclets/html/taglets/center/Makefile - src/doclets/html/taglets/right/Makefile - src/doclets/html/taglets/italic/Makefile - src/doclets/html/taglets/source/Makefile - src/doclets/html/taglets/bold/Makefile - src/doclets/html/taglets/underline/Makefile - src/doclets/html/taglets/notification/Makefile - src/doclets/html/taglets/see/Makefile - src/doclets/html/taglets/table/Makefile - src/doclets/html/taglets/list/Makefile - src/doclets/html/taglets/listelement/Makefile - src/doclets/html/taglets/cell/Makefile + src/doclets/htm/Makefile + src/doclets/htm/doclet/Makefile + src/doclets/htm/deps/Makefile + src/doclets/htm/taglets/Makefile + src/doclets/htm/taglets/parameter/Makefile + src/doclets/htm/taglets/version/Makefile + src/doclets/htm/taglets/throws/Makefile + src/doclets/htm/taglets/return/Makefile + src/doclets/htm/taglets/string/Makefile + src/doclets/htm/taglets/wikilink/Makefile + src/doclets/htm/taglets/image/Makefile + src/doclets/htm/taglets/link/Makefile + src/doclets/htm/taglets/center/Makefile + src/doclets/htm/taglets/right/Makefile + src/doclets/htm/taglets/italic/Makefile + src/doclets/htm/taglets/source/Makefile + src/doclets/htm/taglets/bold/Makefile + src/doclets/htm/taglets/underline/Makefile + src/doclets/htm/taglets/notification/Makefile + src/doclets/htm/taglets/see/Makefile + src/doclets/htm/taglets/table/Makefile + src/doclets/htm/taglets/list/Makefile + src/doclets/htm/taglets/listelement/Makefile + src/doclets/htm/taglets/cell/Makefile src/doclets/valadoc.org/Makefile src/doclets/valadoc.org/doclet/Makefile src/doclets/devhelp/Makefile @@ -115,7 +114,6 @@ AC_CONFIG_FILES([Makefile src/doclets/devhelp/taglets/cell/Makefile src/doclets/devhelp/taglets/source/Makefile src/doclets/devhelp/deps/Makefile - src/doclets/devhelp/linkhelper/Makefile src/doclets/devhelp/doclet/Makefile src/doclets/devhelp/taglets/Makefile src/doclets/devhelp/taglets/parameter/Makefile diff --git a/src/doclets/Makefile.am b/src/doclets/Makefile.am index 0f213e2d5..d4a0a9b50 100644 --- a/src/doclets/Makefile.am +++ b/src/doclets/Makefile.am @@ -5,7 +5,7 @@ NULL = SUBDIRS = \ htmlhelpers \ - html \ + htm \ devhelp \ valadoc.org \ $(NULL) diff --git a/src/doclets/devhelp/Makefile.am b/src/doclets/devhelp/Makefile.am index 3a8018bc4..edbe5923d 100644 --- a/src/doclets/devhelp/Makefile.am +++ b/src/doclets/devhelp/Makefile.am @@ -4,7 +4,6 @@ NULL = SUBDIRS = \ - linkhelper \ doclet \ taglets \ deps \ diff --git a/src/doclets/devhelp/deps/Makefile.am b/src/doclets/devhelp/deps/Makefile.am index 22e2b75a0..59a508c5c 100644 --- a/src/doclets/devhelp/deps/Makefile.am +++ b/src/doclets/devhelp/deps/Makefile.am @@ -4,10 +4,11 @@ NULL = vapidir = $(libdir)/valadoc/plugins/devhelp/deps/ -dist_vapi_DATA = \ - abstractclass.png \ - abstractmethod.png \ - staticmethod.png \ +dist_vapi_DATA = \ + warning.png \ + abstractclass.png \ + abstractmethod.png \ + staticmethod.png \ style.css \ class.png \ interface.png \ @@ -23,6 +24,10 @@ dist_vapi_DATA = \ field.png \ package.png \ struct.png \ + abstractproperty.png \ + constructor.png \ + virtualmethod.png \ + virtualproperty.png \ $(NULL) dist_noinst_DATA = \ diff --git a/src/doclets/devhelp/deps/abstractproperty.png b/src/doclets/devhelp/deps/abstractproperty.png new file mode 100644 index 000000000..ea9e09a80 Binary files /dev/null and b/src/doclets/devhelp/deps/abstractproperty.png differ diff --git a/src/doclets/devhelp/deps/constant.png b/src/doclets/devhelp/deps/constant.png index 5515f7e66..85e248df4 100644 Binary files a/src/doclets/devhelp/deps/constant.png and b/src/doclets/devhelp/deps/constant.png differ diff --git a/src/doclets/devhelp/deps/constructor.png b/src/doclets/devhelp/deps/constructor.png new file mode 100644 index 000000000..eee173892 Binary files /dev/null and b/src/doclets/devhelp/deps/constructor.png differ diff --git a/src/doclets/devhelp/deps/style.css b/src/doclets/devhelp/deps/style.css index 74fda1dc5..3f8a2c38f 100644 --- a/src/doclets/devhelp/deps/style.css +++ b/src/doclets/devhelp/deps/style.css @@ -1,13 +1,10 @@ ul.external_link { } - .main_optional_parameter { font-style: italic; } - - .main_diagram { display: block; margin: 0px auto; @@ -15,22 +12,51 @@ ul.external_link { } .site_navi { - text-align: right;; + text-align: right; } - -div.cms_message { +.main_notification { + padding-right: 10px; + padding-left: 60px; + padding-bottom: 5px; + padding-top: 5px; + border-color: #aaaaff; + background-color: #eeeeff; + border-style: solid; + border-width: 1px; + margin: 10px; + min-height: 48px; + background-position: 6px 0.5em; + background-repeat: no-repeat; + background-image: url(warning.png); } +.main_sourcesample { + padding-right: 10px; + padding-left: 5px; + padding-bottom: 5px; + padding-top: 5px; + margin: 10px; -input { border-color: #aaaaff; + background-color: #eeeeff; border-style: solid; border-width: 1px; } +input { + border-color: #aaaaff; + border-style: solid; + border-width: 1px; +} - +.main_table { + border-collapse: collapse; + border: 1px solid #aaaaff; + background: #eeeeff; + margin-right:auto; + margin-left:auto; +} .site_header { font-size: 25px; @@ -168,16 +194,16 @@ h3.main_title { .main_inline_navigation_virtual_property { - list-style-image: url(property.png); + list-style-image: url(virtualproperty.png); } .main_inline_navigation_abstract_property { - list-style-image: url(property.png); + list-style-image: url(abstractproperty.png); } .navi_abstract_prop { - list-style-image: url(property.png); + list-style-image: url(abstractproperty.png); } .navi_virtual_prop { - list-style-image: url(property.png); + list-style-image: url(virtualproperty.png); } @@ -295,7 +321,7 @@ h3.main_title { border:0px; } .css_content_link_virtual_property { - background-image:url(property.png); + background-image:url(virtualproperty.png); display:inline-block; padding-right:17px; background-repeat:no-repeat; @@ -303,7 +329,7 @@ h3.main_title { border:0px; } .css_content_link_abstract_property { - background-image:url(property.png); + background-image:url(abstractproperty.png); display:inline-block; padding-right:17px; background-repeat:no-repeat; @@ -327,7 +353,7 @@ h3.main_title { border:0px; } .css_content_link_virtual_method { - background-image:url(method.png); + background-image:url(virtualmethod.png); display:inline-block; padding-right:17px; background-repeat:no-repeat; @@ -343,7 +369,7 @@ h3.main_title { border:0px; } .css_content_link_construction_method { - background-image:url(method.png); + background-image:url(constructor.png); display:inline-block; padding-right:17px; background-repeat:no-repeat; @@ -351,6 +377,9 @@ h3.main_title { border:0px; } +.main_inline_navigation_virtual_method { + list-style-image:url(virtualmethod.png); +} .main_inline_navigation_errorcode { list-style-image:url(errorcode.png); } @@ -364,60 +393,63 @@ h3.main_title { list-style-image: url( abstractmethod.png ); } .navi_construction_method, .main_list_m, .main_inline_navigation_construction_method { - list-style-image: url(method.png); + list-style-image: url(constructor.png); } .navi_static_method, .main_inline_navigation_static_method { list-style-image: url(staticmethod.png); } .navi_package_index, .main_inline_navigation_package { - list-style-image: url(packages.png) + list-style-image: url(packages.png); } .main_navi_enval { - list-style-image: url(enumvalue.png) + list-style-image: url(enumvalue.png); } .main_navi_errdomcode { - list-style-image: url(errorcode.png) + list-style-image: url(errorcode.png); } .navi_error_domain, .main_list_errdom, .main_inline_navigation_errordomain { - list-style-image: url(errordomain.png) + list-style-image: url(errordomain.png); } .navi_namespace, .main_list_ns, .main_inline_navigation_namespace { - list-style-image: url(namespace.png) + list-style-image: url(namespace.png); } .navi_method, .main_inline_navigation_method { - list-style-image: url(method.png) + list-style-image: url(method.png); +} +.navi_virtual_method { + list-style-image: url(virtualmethod.png); } .navi_struct, .main_list_stru, .main_inline_navigation_struct { - list-style-image: url(struct.png) + list-style-image: url(struct.png); } .navi_iface, .main_navigation_interface, .main_list_iface { - list-style-image: url(interface.png) + list-style-image: url(interface.png); } .navi_field, .main_inline_navigation_fields, .main_list_field { - list-style-image: url(field.png) + list-style-image: url(field.png); } .navi_class, .main_inline_navigation_class, .main_list_cl { - list-style-image: url(class.png) + list-style-image: url(class.png); } .navi_enum, .main_list_en, .main_inline_navigation_enum { - list-style-image: url(enum.png) + list-style-image: url(enum.png); } .navi_prop, .main_inline_navigation_property, .main_list_prop { - list-style-image: url(property.png) + list-style-image: url(property.png); } .navi_del, .main_list_del, .main_inline_navigation_delegate { - list-style-image: url(delegate.png) + list-style-image: url(delegate.png); } .navi_sig, .main_inline_navigation_signal, .main_list_sig { - list-style-image: url(signal.png) + list-style-image: url(signal.png); } .navi_package, .main_inline_navigation_package { - list-style-image: url(package.png) + list-style-image: url(package.png); } .main_inline_navigation_constant, .navi_constant { - list-style-image: url(constant.png) + list-style-image: url(constant.png); } @@ -438,9 +470,6 @@ h3.main_title { margin-bottom: 5px; } - - - a.navi_link, a.external_link { text-decoration: none; color: #214b87; @@ -448,12 +477,8 @@ a.navi_link, a.external_link { a.navi_link:hover, a.external_link:hover { text-decoration: underline; -# color: #ff0000; } - - - .main_see_list { } diff --git a/src/doclets/devhelp/deps/virtualmethod.png b/src/doclets/devhelp/deps/virtualmethod.png new file mode 100644 index 000000000..5ff14ecf7 Binary files /dev/null and b/src/doclets/devhelp/deps/virtualmethod.png differ diff --git a/src/doclets/devhelp/deps/virtualproperty.png b/src/doclets/devhelp/deps/virtualproperty.png new file mode 100644 index 000000000..795374629 Binary files /dev/null and b/src/doclets/devhelp/deps/virtualproperty.png differ diff --git a/src/doclets/devhelp/deps/warning.png b/src/doclets/devhelp/deps/warning.png new file mode 100644 index 000000000..ecdc0f924 Binary files /dev/null and b/src/doclets/devhelp/deps/warning.png differ diff --git a/src/doclets/devhelp/doclet/Makefile.am b/src/doclets/devhelp/doclet/Makefile.am index a9b2b4f54..7a8ad2d96 100644 --- a/src/doclets/devhelp/doclet/Makefile.am +++ b/src/doclets/devhelp/doclet/Makefile.am @@ -12,7 +12,7 @@ BUILT_SOURCES = libdoclet.vala.stamp libdoclet.vala.stamp: $(libdoclet_VALASOURCES) - $(VALAC) -C --vapidir ../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../vapi --pkg valadoc-1.0 --vapidir ../linkhelper --pkg libxml-2.0 --pkg libhtmlhelper-1.0 --vapidir . --pkg docletconfig --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../vapi --pkg valadoc-1.0 --pkg libxml-2.0 --vapidir . --pkg docletconfig --basedir . $^ touch $@ @@ -35,7 +35,6 @@ AM_CFLAGS = -g \ -DPACKAGE_PLUGINDIR=\"$(libdir)/valadoc/plugins/devhelp/\" \ -I ../../../libvaladoc/ \ -I ../../htmlhelpers/ \ - -I ../linkhelper/ \ -I ../ \ $(GLIB_CFLAGS) \ $(LIBXML2_CFLAGS) \ @@ -49,7 +48,6 @@ libdoclet_la_LDFLAGS = -module -avoid-version libdoclet_la_LIBADD = \ ../../../libvaladoc/libvaladoc.la \ ../../htmlhelpers/libhtmlhelpers.la \ - ../linkhelper/libhtmlhelper.la \ $(LIBXML2_LIBS) \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ diff --git a/src/doclets/devhelp/doclet/template.vala b/src/doclets/devhelp/doclet/template.vala index 74d6e538a..f234561d3 100644 --- a/src/doclets/devhelp/doclet/template.vala +++ b/src/doclets/devhelp/doclet/template.vala @@ -25,9 +25,9 @@ using Gee; -public class Valadoc.LangletIndex : Valadoc.BasicHtmlLanglet, Valadoc.HtmlHelper { +public class Valadoc.LangletIndex : Valadoc.BasicHtmlLanglet { protected override string get_link ( DocumentedElement element, DocumentedElement? pos ) { - return this.get_html_link ( this.settings, element, pos ); + return get_html_link ( this.settings, element, pos ); } public LangletIndex ( Settings settings ) { @@ -146,14 +146,11 @@ public class DevhelpFormat : Object { -public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.HtmlHelper { - private string package_dir_name = ""; +public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet { + private const string css_path = "style.css"; + private string package_dir_name = ""; // remove private DevhelpFormat devhelp; - protected override string get_link ( DocumentedElement p1, DocumentedElement? p2 ) { - return this.get_html_link ( this.settings, p1, p2 ); - } - private string get_path ( DocumentedElement element ) { return element.full_name () + ".html"; } @@ -162,19 +159,6 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.HtmlHelper { return this.settings.get_real_path ( ) + "/" + this.package_dir_name + "/" + element.full_name () + ".html"; } - protected override string get_img_path ( DocumentedElement element ) { - return "img/" + element.full_name () + ".png"; - } - - protected override string get_img_real_path ( DocumentedElement element ) { - return this.settings.get_real_path ( ) + "/" + this.package_dir_name + "/" + "img/" + element.full_name () + ".png"; - } - - public Valadoc.Settings settings { - construct set; - protected get; - } - public override void initialisation ( Settings settings, Tree tree ) { this.settings = settings; @@ -202,7 +186,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.HtmlHelper { this.devhelp = new DevhelpFormat ( pkg_name, "" ); GLib.FileStream ifile = GLib.FileStream.open ( path + "index.htm", "w" ); - this.write_file_header ( ifile, "style.css", pkg_name ); + this.write_file_header ( ifile, this.css_path, pkg_name ); this.write_file_content ( ifile, file, file ); this.write_file_footer ( ifile ); ifile = null; @@ -217,7 +201,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.HtmlHelper { string path = this.get_path ( ns ); GLib.FileStream file = GLib.FileStream.open ( rpath, "w" ); - this.write_file_header ( file, "style.css", ns.full_name() ); + this.write_file_header ( file, this.css_path, ns.full_name() ); this.write_namespace_content ( file, ns, ns ); this.write_file_footer ( file ); file = null; @@ -264,7 +248,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.HtmlHelper { this.devhelp.add_keyword ( KeywordType.INTERFACE, iface.name, path ); GLib.FileStream file = GLib.FileStream.open ( rpath, "w"); - this.write_file_header ( file, "style.css", iface.full_name() ); + this.write_file_header ( file, this.css_path, iface.full_name() ); this.write_interface_content ( file, iface, iface ); this.write_file_footer ( file ); file = null; @@ -293,7 +277,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.HtmlHelper { GLib.FileStream file = GLib.FileStream.open ( rpath, "w"); - this.write_file_header ( file, "style.css", cl.full_name() ); + this.write_file_header ( file, this.css_path, cl.full_name() ); this.write_class_content ( file, cl, cl ); this.write_file_footer ( file ); file = null; @@ -316,7 +300,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.HtmlHelper { GLib.FileStream file = GLib.FileStream.open ( rpath, "w"); - this.write_file_header ( file, "style.css", stru.full_name() ); + this.write_file_header ( file, this.css_path, stru.full_name() ); this.write_struct_content ( file, stru, stru ); this.write_file_footer ( file ); @@ -333,7 +317,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.HtmlHelper { this.devhelp.add_chapter ( errdom.name, path ); GLib.FileStream file = GLib.FileStream.open ( rpath, "w"); - this.write_file_header ( file, "style.css", errdom.full_name() ); + this.write_file_header ( file, this.css_path, errdom.full_name() ); this.write_error_domain_content ( file, errdom, errdom ); this.write_file_footer ( file ); file = null; @@ -350,7 +334,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.HtmlHelper { this.devhelp.add_chapter ( en.name, path ); GLib.FileStream file = GLib.FileStream.open ( rpath, "w"); - this.write_file_header ( file, "style.css", en.full_name() ); + this.write_file_header ( file, this.css_path, en.full_name() ); this.write_enum_content ( file, en, en ); this.write_file_footer ( file ); file = null; @@ -364,7 +348,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.HtmlHelper { this.devhelp.add_chapter ( prop.name, path ); GLib.FileStream file = GLib.FileStream.open ( rpath, "w"); - this.write_file_header ( file, "style.css", prop.full_name() ); + this.write_file_header ( file, this.css_path, prop.full_name() ); this.write_property_content ( file, prop ); this.write_file_footer ( file ); file = null; @@ -378,7 +362,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.HtmlHelper { this.devhelp.add_chapter ( constant.name, path ); GLib.FileStream file = GLib.FileStream.open ( rpath, "w"); - this.write_file_header ( file, "style.css", constant.full_name() ); + this.write_file_header ( file, this.css_path, constant.full_name() ); this.write_constant_content ( file, constant, parent ); this.write_file_footer ( file ); file = null; @@ -392,7 +376,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.HtmlHelper { this.devhelp.add_chapter ( field.name, path ); GLib.FileStream file = GLib.FileStream.open ( rpath, "w"); - this.write_file_header ( file, "style.css", field.full_name() ); + this.write_file_header ( file, this.css_path, field.full_name() ); this.write_field_content ( file, field, parent ); this.write_file_footer ( file ); file = null; @@ -412,7 +396,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.HtmlHelper { this.devhelp.add_chapter ( del.name, path ); GLib.FileStream file = GLib.FileStream.open ( rpath, "w"); - this.write_file_header ( file, "style.css", del.full_name() ); + this.write_file_header ( file, this.css_path, del.full_name() ); this.write_delegate_content ( file, del ); this.write_file_footer ( file ); file = null; @@ -426,7 +410,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.HtmlHelper { this.devhelp.add_chapter ( sig.name, path ); GLib.FileStream file = GLib.FileStream.open ( rpath, "w"); - this.write_file_header ( file, "style.css", sig.full_name() ); + this.write_file_header ( file, this.css_path, sig.full_name() ); write_signal_content ( file, sig ); this.write_file_footer ( file ); file = null; @@ -440,7 +424,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.HtmlHelper { this.devhelp.add_chapter ( m.name, path ); GLib.FileStream file = GLib.FileStream.open ( rpath, "w"); - this.write_file_header ( file, "style.css", m.full_name() ); + this.write_file_header ( file, this.css_path, m.full_name() ); this.write_method_content ( file, m, parent ); this.write_file_footer ( file ); file = null; diff --git a/src/doclets/devhelp/linkhelper/Makefile.am b/src/doclets/devhelp/linkhelper/Makefile.am deleted file mode 100644 index 1e334d271..000000000 --- a/src/doclets/devhelp/linkhelper/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -# src/Makefile.am - - - -libhtmlhelper_VALASOURCES = \ - helper.vala \ - $(NULL) - - -BUILT_SOURCES = libhtmlhelper.vala.stamp - - -libhtmlhelper.vala.stamp: $(libhtmlhelper_VALASOURCES) - $(VALAC) -C --library libhtmlhelper-1.0 --basedir . --vapidir ../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../vapi --pkg valadoc-1.0 $^ - touch $@ - - - -htmlhelperdir = $(libdir)/valadoc/plugins/devhelp/ -htmlhelper_LTLIBRARIES = libhtmlhelper.la - - -libhtmlhelper_la_SOURCES = \ - libhtmlhelper.vala.stamp \ - $(libhtmlhelper_VALASOURCES:.vala=.c) \ - $(libhtmlhelper_VALASOURCES:.vala=.h) \ - $(NULL) - - -AM_CFLAGS = \ - -I ../../../libvaladoc/ \ - -I ../../htmlhelpers/ \ - $(LIBVALA_CFLAGS) \ - $(GLIB_CFLAGS) \ - $(NULL) - - -libhtmlhelper_la_LIBADD = \ - ../../../libvaladoc/libvaladoc.la \ - ../../htmlhelpers/libhtmlhelpers.la \ - $(LIBVALA_LIBS) \ - $(GLIB_LIBS) \ - $(NULL) - - -EXTRA_DIST = $(libhtmlhelper_VALASOURCES) libhtmlhelper.vala.stamp diff --git a/src/doclets/devhelp/linkhelper/helper.vala b/src/doclets/devhelp/linkhelper/helper.vala deleted file mode 100755 index 355523e97..000000000 --- a/src/doclets/devhelp/linkhelper/helper.vala +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Valadoc - a documentation tool for vala. - * Copyright (C) 2008 Florian Brosch - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - - -using Valadoc; -using GLib; - - -public interface Valadoc.HtmlHelper { - protected string? get_html_link ( Settings settings, DocumentedElement element, DocumentedElement? pos ) { - if ( element is Package ) { - return "../" + element.name + "/index.html"; - } - - string tmp = ""; - string prefix = ""; - - if ( element != pos ) { - prefix = "../" + element.package.name; - } - - if ( element is Valadoc.EnumValue || element is Valadoc.ErrorCode ) { - tmp = "#" + element.name; - element = (DocumentedElement)element.parent; - } - - return prefix + "/" + element.full_name () + ".html" + tmp; - } -} - - diff --git a/src/doclets/devhelp/taglets/bold/Makefile.am b/src/doclets/devhelp/taglets/bold/Makefile.am index 1bfa5340b..043d009a2 100755 --- a/src/doclets/devhelp/taglets/bold/Makefile.am +++ b/src/doclets/devhelp/taglets/bold/Makefile.am @@ -11,7 +11,7 @@ BUILT_SOURCES = libtagletbold.vala.stamp libtagletbold.vala.stamp: $(libtagletbold_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ @@ -33,7 +33,6 @@ libtagletbold_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletbold_la_LDFLAGS = -module -avoid-version libtagletbold_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/devhelp/taglets/cell/Makefile.am b/src/doclets/devhelp/taglets/cell/Makefile.am index e6beb744f..889b328ad 100755 --- a/src/doclets/devhelp/taglets/cell/Makefile.am +++ b/src/doclets/devhelp/taglets/cell/Makefile.am @@ -11,7 +11,7 @@ BUILT_SOURCES = libtaglettablecell.vala.stamp libtaglettablecell.vala.stamp: $(libtaglettablecell_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ @@ -33,7 +33,6 @@ libtaglettablecell_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtaglettablecell_la_LDFLAGS = -module -avoid-version libtaglettablecell_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/devhelp/taglets/center/Makefile.am b/src/doclets/devhelp/taglets/center/Makefile.am index 757a2c061..bb5c549dc 100755 --- a/src/doclets/devhelp/taglets/center/Makefile.am +++ b/src/doclets/devhelp/taglets/center/Makefile.am @@ -11,7 +11,7 @@ BUILT_SOURCES = libtagletcenter.vala.stamp libtagletcenter.vala.stamp: $(libtagletcenter_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ @@ -33,7 +33,6 @@ libtagletcenter_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletcenter_la_LDFLAGS = -module -avoid-version libtagletcenter_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/devhelp/taglets/image/Makefile.am b/src/doclets/devhelp/taglets/image/Makefile.am index 71a91f172..a5c190d77 100755 --- a/src/doclets/devhelp/taglets/image/Makefile.am +++ b/src/doclets/devhelp/taglets/image/Makefile.am @@ -11,13 +11,13 @@ BUILT_SOURCES = libtagletimage.vala.stamp libtagletimage.vala.stamp: $(libtagletimage_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ -tagletimagedir = $(libdir)/valadoc/plugins/template/taglets/ +tagletimagedir = $(libdir)/valadoc/plugins/devhelp/taglets/ tagletimage_LTLIBRARIES = libtagletimage.la @@ -33,7 +33,6 @@ libtagletimage_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletimage_la_LDFLAGS = -module -avoid-version libtagletimage_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/devhelp/taglets/italic/Makefile.am b/src/doclets/devhelp/taglets/italic/Makefile.am index 01b1e5f8b..92bb1f28c 100755 --- a/src/doclets/devhelp/taglets/italic/Makefile.am +++ b/src/doclets/devhelp/taglets/italic/Makefile.am @@ -11,7 +11,7 @@ BUILT_SOURCES = libtagletitalic.vala.stamp libtagletitalic.vala.stamp: $(libtagletitalic_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ @@ -33,7 +33,6 @@ libtagletitalic_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletitalic_la_LDFLAGS = -module -avoid-version libtagletitalic_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/devhelp/taglets/link/Makefile.am b/src/doclets/devhelp/taglets/link/Makefile.am index 333c1a4fa..5c67e3f9c 100644 --- a/src/doclets/devhelp/taglets/link/Makefile.am +++ b/src/doclets/devhelp/taglets/link/Makefile.am @@ -11,7 +11,7 @@ BUILT_SOURCES = libtagletparameter.vala.stamp libtagletparameter.vala.stamp: $(libtagletparameter_VALASOURCES) - $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^ touch $@ @@ -33,7 +33,6 @@ libtagletparameter_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletparameter_la_LDFLAGS = -module -avoid-version libtagletparameter_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/devhelp/taglets/link/taglet.vala b/src/doclets/devhelp/taglets/link/taglet.vala index deb1f6b85..0b89fe9db 100644 --- a/src/doclets/devhelp/taglets/link/taglet.vala +++ b/src/doclets/devhelp/taglets/link/taglet.vala @@ -19,21 +19,33 @@ using Valadoc; using GLib; -using Vala; using Gee; +public class Valadoc.LinkHtmlTaglet : Valadoc.LinkHtmlHelperTaglet { + protected override string? get_link ( Settings settings, Tree tree, DocumentedElement element, DocumentedElement? pos ) { + return get_html_link ( settings, element, pos ); + } -using Valadoc; -using GLib; -using Vala; -using Gee; + public override string to_string () { + return to_string_imp ( ); + } + + public override bool write ( void* res, int max, int index ) { + return write_imp ( res, max, index ); + } + + public override bool parse ( Settings settings, Tree tree, DocumentedElement me, string content, out string[] errmsg ) { + return this.parse_imp ( settings, tree, me, content, out errmsg ); + } +} [ModuleInit] public GLib.Type register_plugin ( Gee.HashMap taglets ) { - GLib.Type type = typeof ( ParameterHtmlTaglet ); - taglets.set ( "param", type ); + GLib.Type type = typeof ( LinkHtmlTaglet ); + taglets.set ( "link", type ); return type; } + diff --git a/src/doclets/devhelp/taglets/list/Makefile.am b/src/doclets/devhelp/taglets/list/Makefile.am index 71980f114..ebee9a6f3 100755 --- a/src/doclets/devhelp/taglets/list/Makefile.am +++ b/src/doclets/devhelp/taglets/list/Makefile.am @@ -11,7 +11,7 @@ BUILT_SOURCES = libtagletlist.vala.stamp libtagletlist.vala.stamp: $(libtagletlist_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ @@ -33,7 +33,6 @@ libtagletlist_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletlist_la_LDFLAGS = -module -avoid-version libtagletlist_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/devhelp/taglets/listelement/Makefile.am b/src/doclets/devhelp/taglets/listelement/Makefile.am index 5eead8a94..5b300e412 100755 --- a/src/doclets/devhelp/taglets/listelement/Makefile.am +++ b/src/doclets/devhelp/taglets/listelement/Makefile.am @@ -11,7 +11,7 @@ BUILT_SOURCES = libtagletlistelement.vala.stamp libtagletlistelement.vala.stamp: $(libtagletlistelement_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ @@ -33,7 +33,6 @@ libtagletlistelement_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletlistelement_la_LDFLAGS = -module -avoid-version libtagletlistelement_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/devhelp/taglets/notification/Makefile.am b/src/doclets/devhelp/taglets/notification/Makefile.am index 3e26848fc..d45329ffd 100755 --- a/src/doclets/devhelp/taglets/notification/Makefile.am +++ b/src/doclets/devhelp/taglets/notification/Makefile.am @@ -11,7 +11,7 @@ BUILT_SOURCES = libtagletnotification.vala.stamp libtagletnotification.vala.stamp: $(libtagletnotification_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ @@ -33,7 +33,6 @@ libtagletnotification_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletnotification_la_LDFLAGS = -module -avoid-version libtagletnotification_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/devhelp/taglets/parameter/Makefile.am b/src/doclets/devhelp/taglets/parameter/Makefile.am index 333c1a4fa..5c67e3f9c 100644 --- a/src/doclets/devhelp/taglets/parameter/Makefile.am +++ b/src/doclets/devhelp/taglets/parameter/Makefile.am @@ -11,7 +11,7 @@ BUILT_SOURCES = libtagletparameter.vala.stamp libtagletparameter.vala.stamp: $(libtagletparameter_VALASOURCES) - $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^ touch $@ @@ -33,7 +33,6 @@ libtagletparameter_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletparameter_la_LDFLAGS = -module -avoid-version libtagletparameter_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/devhelp/taglets/parameter/taglet.vala b/src/doclets/devhelp/taglets/parameter/taglet.vala index deb1f6b85..c5dc34543 100644 --- a/src/doclets/devhelp/taglets/parameter/taglet.vala +++ b/src/doclets/devhelp/taglets/parameter/taglet.vala @@ -23,13 +23,6 @@ using Vala; using Gee; - -using Valadoc; -using GLib; -using Vala; -using Gee; - - [ModuleInit] public GLib.Type register_plugin ( Gee.HashMap taglets ) { GLib.Type type = typeof ( ParameterHtmlTaglet ); diff --git a/src/doclets/devhelp/taglets/return/Makefile.am b/src/doclets/devhelp/taglets/return/Makefile.am index 24c464750..fb8a9631b 100644 --- a/src/doclets/devhelp/taglets/return/Makefile.am +++ b/src/doclets/devhelp/taglets/return/Makefile.am @@ -2,30 +2,30 @@ -libtagletXXXX_VALASOURCES = \ +libtagletreturn_VALASOURCES = \ taglet.vala \ $(NULL) -BUILT_SOURCES = libtagletXXXX.vala.stamp +BUILT_SOURCES = libtagletreturn.vala.stamp -libtagletXXXX.vala.stamp: $(libtagletXXXX_VALASOURCES) - $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ +libtagletreturn.vala.stamp: $(libtagletreturn_VALASOURCES) + $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^ touch $@ -tagletXXXXdir = $(libdir)/valadoc/plugins/devhelp/taglets/ +tagletreturndir = $(libdir)/valadoc/plugins/devhelp/taglets/ -tagletXXXX_LTLIBRARIES = libtagletXXXX.la +tagletreturn_LTLIBRARIES = libtagletreturn.la -libtagletXXXX_la_SOURCES = \ - libtagletXXXX.vala.stamp \ - $(libtagletXXXX_VALASOURCES:.vala=.c) \ - $(libtagletXXXX_VALASOURCES:.vala=.h) \ +libtagletreturn_la_SOURCES = \ + libtagletreturn.vala.stamp \ + $(libtagletreturn_VALASOURCES:.vala=.c) \ + $(libtagletreturn_VALASOURCES:.vala=.h) \ $(NULL) @@ -33,20 +33,18 @@ libtagletXXXX_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ $(NULL) -libtagletXXXX_la_LDFLAGS = -module -avoid-version +libtagletreturn_la_LDFLAGS = -module -avoid-version -libtagletXXXX_la_LIBADD = \ +libtagletreturn_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) @@ -54,4 +52,4 @@ libtagletXXXX_la_LIBADD = \ -EXTRA_DIST = $(libtagletXXXX_VALASOURCES) libtagletXXXX.vala.stamp +EXTRA_DIST = $(libtagletreturn_VALASOURCES) libtagletreturn.vala.stamp diff --git a/src/doclets/devhelp/taglets/right/Makefile.am b/src/doclets/devhelp/taglets/right/Makefile.am index 5bf2c9fb0..3ee7f8d16 100755 --- a/src/doclets/devhelp/taglets/right/Makefile.am +++ b/src/doclets/devhelp/taglets/right/Makefile.am @@ -11,7 +11,7 @@ BUILT_SOURCES = libtagletright.vala.stamp libtagletright.vala.stamp: $(libtagletright_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ @@ -33,7 +33,6 @@ libtagletright_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletright_la_LDFLAGS = -module -avoid-version libtagletright_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/devhelp/taglets/see/Makefile.am b/src/doclets/devhelp/taglets/see/Makefile.am index 7efee3224..6d3cc14ab 100644 --- a/src/doclets/devhelp/taglets/see/Makefile.am +++ b/src/doclets/devhelp/taglets/see/Makefile.am @@ -11,7 +11,7 @@ BUILT_SOURCES = libtagletsee.vala.stamp libtagletsee.vala.stamp: $(libtagletsee_VALASOURCES) - $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^ touch $@ @@ -33,7 +33,6 @@ libtagletsee_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletsee_la_LDFLAGS = -module -avoid-version libtagletsee_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/devhelp/taglets/see/taglet.vala b/src/doclets/devhelp/taglets/see/taglet.vala index 80317a3b7..a7b5d80b3 100644 --- a/src/doclets/devhelp/taglets/see/taglet.vala +++ b/src/doclets/devhelp/taglets/see/taglet.vala @@ -24,9 +24,9 @@ using Gee; -public class Valadoc.SeeDevhelpTaglet : SeeHtmlHelperTaglet, HtmlHelper { +public class Valadoc.SeeDevhelpTaglet : SeeHtmlHelperTaglet { protected override string? get_link ( Settings settings, Tree tree, DocumentedElement element, DocumentedElement? pos ) { - return this.get_html_link ( settings, element, pos ); + return get_html_link ( settings, element, pos ); } public override bool write_block_start ( void* ptr ) { diff --git a/src/doclets/devhelp/taglets/source/Makefile.am b/src/doclets/devhelp/taglets/source/Makefile.am index 3a9c16acd..9107bfcb8 100755 --- a/src/doclets/devhelp/taglets/source/Makefile.am +++ b/src/doclets/devhelp/taglets/source/Makefile.am @@ -11,7 +11,7 @@ BUILT_SOURCES = libtagletsrcsample.vala.stamp libtagletsrcsample.vala.stamp: $(libtagletsrcsample_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ @@ -33,7 +33,6 @@ libtagletsrcsample_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletsrcsample_la_LDFLAGS = -module -avoid-version libtagletsrcsample_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/devhelp/taglets/string/Makefile.am b/src/doclets/devhelp/taglets/string/Makefile.am index cb8c68fe1..b13ee622a 100644 --- a/src/doclets/devhelp/taglets/string/Makefile.am +++ b/src/doclets/devhelp/taglets/string/Makefile.am @@ -11,7 +11,7 @@ BUILT_SOURCES = libtagletstring.vala.stamp libtagletstring.vala.stamp: $(libtagletstring_VALASOURCES) - $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^ touch $@ @@ -33,7 +33,6 @@ libtagletstring_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletstring_la_LDFLAGS = -module -avoid-version libtagletstring_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/devhelp/taglets/table/Makefile.am b/src/doclets/devhelp/taglets/table/Makefile.am index 69cd5679a..c2115f618 100755 --- a/src/doclets/devhelp/taglets/table/Makefile.am +++ b/src/doclets/devhelp/taglets/table/Makefile.am @@ -11,7 +11,7 @@ BUILT_SOURCES = libtaglettable.vala.stamp libtaglettable.vala.stamp: $(libtaglettable_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ @@ -33,7 +33,6 @@ libtaglettable_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtaglettable_la_LDFLAGS = -module -avoid-version libtaglettable_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/devhelp/taglets/throws/Makefile.am b/src/doclets/devhelp/taglets/throws/Makefile.am index c72fd817f..cd5ee3863 100644 --- a/src/doclets/devhelp/taglets/throws/Makefile.am +++ b/src/doclets/devhelp/taglets/throws/Makefile.am @@ -11,7 +11,7 @@ BUILT_SOURCES = libexceptionparameter.vala.stamp libexceptionparameter.vala.stamp: $(libexceptionparameter_VALASOURCES) - $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^ touch $@ @@ -33,7 +33,6 @@ libexceptionparameter_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libexceptionparameter_la_LDFLAGS = -module -avoid-version libexceptionparameter_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/devhelp/taglets/underline/Makefile.am b/src/doclets/devhelp/taglets/underline/Makefile.am index 6ca6ea6c2..b6aba36b8 100755 --- a/src/doclets/devhelp/taglets/underline/Makefile.am +++ b/src/doclets/devhelp/taglets/underline/Makefile.am @@ -11,7 +11,7 @@ BUILT_SOURCES = libtagletunderline.vala.stamp libtagletunderline.vala.stamp: $(libtagletunderline_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ @@ -32,7 +32,6 @@ libtagletunderline_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -45,7 +44,6 @@ libtagletunderline_la_LDFLAGS = -module -avoid-version libtagletunderline_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/devhelp/taglets/version/Makefile.am b/src/doclets/devhelp/taglets/version/Makefile.am index 5c4ca5a17..4285b143a 100644 --- a/src/doclets/devhelp/taglets/version/Makefile.am +++ b/src/doclets/devhelp/taglets/version/Makefile.am @@ -11,7 +11,7 @@ BUILT_SOURCES = libtagletversion.vala.stamp libtagletversion.vala.stamp: $(libtagletversion_VALASOURCES) - $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^ touch $@ @@ -33,7 +33,6 @@ libtagletversion_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletversion_la_LDFLAGS = -module -avoid-version libtagletversion_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/devhelp/taglets/wikilink/Makefile.am b/src/doclets/devhelp/taglets/wikilink/Makefile.am index 3ccd539a2..440d5aa6e 100755 --- a/src/doclets/devhelp/taglets/wikilink/Makefile.am +++ b/src/doclets/devhelp/taglets/wikilink/Makefile.am @@ -11,7 +11,7 @@ BUILT_SOURCES = libtagletwikilink.vala.stamp libtagletwikilink.vala.stamp: $(libtagletwikilink_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ @@ -33,7 +33,6 @@ libtagletwikilink_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletwikilink_la_LDFLAGS = -module -avoid-version libtagletwikilink_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/html/Makefile.am b/src/doclets/htm/Makefile.am similarity index 58% rename from src/doclets/html/Makefile.am rename to src/doclets/htm/Makefile.am index 1f041948a..edbe5923d 100644 --- a/src/doclets/html/Makefile.am +++ b/src/doclets/htm/Makefile.am @@ -4,14 +4,9 @@ NULL = SUBDIRS = \ - linkhelper \ doclet \ taglets \ deps \ $(NULL) -# langlet \ -# doclet \ -# $(NULL) - diff --git a/src/doclets/html/deps/Makefile.am b/src/doclets/htm/deps/Makefile.am similarity index 52% rename from src/doclets/html/deps/Makefile.am rename to src/doclets/htm/deps/Makefile.am index db572ab4d..c3e8c3d10 100644 --- a/src/doclets/html/deps/Makefile.am +++ b/src/doclets/htm/deps/Makefile.am @@ -1,20 +1,19 @@ NULL = -vapidir = $(libdir)/valadoc/plugins/template/deps/ +vapidir = $(libdir)/valadoc/plugins/html/deps/ -dist_vapi_DATA = \ - abstractclass.png \ - abstractmethod.png \ - staticmethod.png \ - main.css \ +dist_vapi_DATA = \ + warning.png \ + abstractclass.png \ + abstractmethod.png \ + staticmethod.png \ + style.css \ class.png \ - enumvalue.png \ interface.png \ packages.png \ constant.png \ - errorcode.png \ method.png \ property.png \ delegate.png \ @@ -25,6 +24,10 @@ dist_vapi_DATA = \ field.png \ package.png \ struct.png \ + abstractproperty.png \ + constructor.png \ + virtualmethod.png \ + virtualproperty.png \ $(NULL) dist_noinst_DATA = \ diff --git a/src/doclets/html/deps/abstractclass.png b/src/doclets/htm/deps/abstractclass.png similarity index 100% rename from src/doclets/html/deps/abstractclass.png rename to src/doclets/htm/deps/abstractclass.png diff --git a/src/doclets/html/deps/abstractmethod.png b/src/doclets/htm/deps/abstractmethod.png similarity index 100% rename from src/doclets/html/deps/abstractmethod.png rename to src/doclets/htm/deps/abstractmethod.png diff --git a/src/doclets/htm/deps/abstractproperty.png b/src/doclets/htm/deps/abstractproperty.png new file mode 100644 index 000000000..ea9e09a80 Binary files /dev/null and b/src/doclets/htm/deps/abstractproperty.png differ diff --git a/src/doclets/html/deps/class.png b/src/doclets/htm/deps/class.png similarity index 100% rename from src/doclets/html/deps/class.png rename to src/doclets/htm/deps/class.png diff --git a/src/doclets/htm/deps/constant.png b/src/doclets/htm/deps/constant.png new file mode 100644 index 000000000..85e248df4 Binary files /dev/null and b/src/doclets/htm/deps/constant.png differ diff --git a/src/doclets/htm/deps/constructor.png b/src/doclets/htm/deps/constructor.png new file mode 100644 index 000000000..eee173892 Binary files /dev/null and b/src/doclets/htm/deps/constructor.png differ diff --git a/src/doclets/html/deps/delegate.png b/src/doclets/htm/deps/delegate.png similarity index 100% rename from src/doclets/html/deps/delegate.png rename to src/doclets/htm/deps/delegate.png diff --git a/src/doclets/html/deps/enum.png b/src/doclets/htm/deps/enum.png similarity index 100% rename from src/doclets/html/deps/enum.png rename to src/doclets/htm/deps/enum.png diff --git a/src/doclets/html/deps/errordomain.png b/src/doclets/htm/deps/errordomain.png similarity index 100% rename from src/doclets/html/deps/errordomain.png rename to src/doclets/htm/deps/errordomain.png diff --git a/src/doclets/html/deps/field.png b/src/doclets/htm/deps/field.png similarity index 100% rename from src/doclets/html/deps/field.png rename to src/doclets/htm/deps/field.png diff --git a/src/doclets/html/deps/interface.png b/src/doclets/htm/deps/interface.png similarity index 100% rename from src/doclets/html/deps/interface.png rename to src/doclets/htm/deps/interface.png diff --git a/src/doclets/html/deps/method.png b/src/doclets/htm/deps/method.png similarity index 100% rename from src/doclets/html/deps/method.png rename to src/doclets/htm/deps/method.png diff --git a/src/doclets/html/deps/namespace.png b/src/doclets/htm/deps/namespace.png similarity index 100% rename from src/doclets/html/deps/namespace.png rename to src/doclets/htm/deps/namespace.png diff --git a/src/doclets/html/deps/package.png b/src/doclets/htm/deps/package.png similarity index 100% rename from src/doclets/html/deps/package.png rename to src/doclets/htm/deps/package.png diff --git a/src/doclets/html/deps/packages.png b/src/doclets/htm/deps/packages.png similarity index 100% rename from src/doclets/html/deps/packages.png rename to src/doclets/htm/deps/packages.png diff --git a/src/doclets/html/deps/property.png b/src/doclets/htm/deps/property.png similarity index 100% rename from src/doclets/html/deps/property.png rename to src/doclets/htm/deps/property.png diff --git a/src/doclets/html/deps/signal.png b/src/doclets/htm/deps/signal.png similarity index 100% rename from src/doclets/html/deps/signal.png rename to src/doclets/htm/deps/signal.png diff --git a/src/doclets/html/deps/staticmethod.png b/src/doclets/htm/deps/staticmethod.png similarity index 100% rename from src/doclets/html/deps/staticmethod.png rename to src/doclets/htm/deps/staticmethod.png diff --git a/src/doclets/html/deps/struct.png b/src/doclets/htm/deps/struct.png similarity index 100% rename from src/doclets/html/deps/struct.png rename to src/doclets/htm/deps/struct.png diff --git a/src/doclets/html/deps/main.css b/src/doclets/htm/deps/style.css similarity index 67% rename from src/doclets/html/deps/main.css rename to src/doclets/htm/deps/style.css index 84fa77ca7..61d0ba80c 100644 --- a/src/doclets/html/deps/main.css +++ b/src/doclets/htm/deps/style.css @@ -1,13 +1,10 @@ ul.external_link { } - .main_optional_parameter { font-style: italic; } - - .main_diagram { display: block; margin: 0px auto; @@ -15,14 +12,44 @@ ul.external_link { } .site_navi { - text-align: right;; + text-align: right; } -.main_inline_navigation_brief_description { - color: #808080; +.main_notification { + padding-right: 10px; + padding-left: 60px; + padding-bottom: 5px; + padding-top: 5px; + border-color: #aaaaff; + background-color: #eeeeff; + border-style: solid; + border-width: 1px; + margin: 10px; + min-height: 48px; + background-position: 6px 0.5em; + background-repeat: no-repeat; + background-image: url(warning.png); } -div.cms_message { +.main_table { + border-collapse: collapse; + border: 1px solid #aaaaff; + background: #eeeeff; + margin-right:auto; + margin-left:auto; +} + +.main_sourcesample { + padding-right: 10px; + padding-left: 5px; + padding-bottom: 5px; + padding-top: 5px; + margin: 10px; + + border-color: #aaaaff; + background-color: #eeeeff; + border-style: solid; + border-width: 1px; } @@ -83,7 +110,7 @@ div.site_navigation { .site_content { font-size: 10px; - margin-left: 255px; + margin-left: 250px; margin-right: 5px; text-align: left; } @@ -170,154 +197,199 @@ h3.main_title { - -.main_inline_navigation_errorcode { - list-style-image:url(errorcode.png); +.main_inline_navigation_virtual_property { + list-style-image: url(virtualproperty.png); } -.main_inline_navigation_enumvalue { - list-style-image:url(enumvalue.png); +.main_inline_navigation_abstract_property { + list-style-image: url(abstractproperty.png); +} +.navi_abstract_prop { + list-style-image: url(abstractproperty.png); } +.navi_virtual_prop { + list-style-image: url(virtualproperty.png); +} + + + .css_content_link_constant { background-image:url(constant.png); - padding-left:17px; - padding-top:1px; + display:inline-block; + padding-right:17px; background-repeat:no-repeat; + background-position:center right; + border:0px; } .css_content_link_namespace { background-image:url(namespace.png); - padding-left:17px; - padding-top:1px; + display:inline-block; + padding-right:17px; background-repeat:no-repeat; + background-position:center right; + border:0px; } .css_content_link_struct { background-image:url(struct.png); - padding-left:17px; - padding-top:1px; + display:inline-block; + padding-right:17px; background-repeat:no-repeat; + background-position:center right; + border:0px; } .css_content_link_interface { background-image:url(interface.png); - padding-left:17px; - padding-top:1px; + display:inline-block; + padding-right:17px; background-repeat:no-repeat; + background-position:center right; + border:0px; } .css_content_link_enum { background-image:url(enum.png); - padding-left:17px; - padding-top:1px; + display:inline-block; + padding-right:17px; background-repeat:no-repeat; + background-position:center right; + border:0px; } .css_content_link_errordomain { background-image:url(errordomain.png); - padding-left:17px; - padding-top:1px; + display:inline-block; + padding-right:17px; background-repeat:no-repeat; + background-position:center right; + border:0px; } .css_content_link_delegate { background-image:url(delegate.png); - padding-left:17px; - padding-top:1px; + display:inline-block; + padding-right:17px; background-repeat:no-repeat; + background-position:center right; + border:0px; } .css_content_link_signal { background-image:url(signal.png); - padding-left:17px; - padding-top:1px; + display:inline-block; + padding-right:17px; background-repeat:no-repeat; + background-position:center right; + border:0px; } .css_content_link_field { background-image:url(field.png); - padding-left:17px; - padding-top:1px; + display:inline-block; + padding-right:17px; background-repeat:no-repeat; + background-position:center right; + border:0px; } .css_content_link_enumvalue { background-image:url(enumvalue.png); - padding-left:17px; - padding-top:1px; + display:inline-block; + padding-right:17px; background-repeat:no-repeat; + background-position:center right; + border:0px; } .css_content_link_errorcode { background-image:url(errorcode.png); - padding-left:17px; - padding-top:1px; + display:inline-block; + padding-right:17px; background-repeat:no-repeat; + background-position:center right; + border:0px; } .css_content_link_class { background-image:url(class.png); - padding-left:17px; - padding-top:1px; + display:inline-block; + padding-right:17px; background-repeat:no-repeat; + background-position:center right; + border:0px; } .css_content_link_abstract_class { background-image:url(abstractclass.png); - padding-left:17px; - padding-top:1px; + display:inline-block; + padding-right:17px; background-repeat:no-repeat; + background-position:center right; + border:0px; } .css_content_link_property { background-image:url(property.png); - padding-left:17px; - padding-top:1px; + display:inline-block; + padding-right:17px; background-repeat:no-repeat; + background-position:center right; + border:0px; } .css_content_link_virtual_property { - background-image:url(property.png); - padding-left:17px; - padding-top:1px; + background-image:url(virtualproperty.png); + display:inline-block; + padding-right:17px; background-repeat:no-repeat; + background-position:center right; + border:0px; } .css_content_link_abstract_property { - background-image:url(property.png); - padding-left:17px; - padding-top:1px; + background-image:url(abstractproperty.png); + display:inline-block; + padding-right:17px; background-repeat:no-repeat; + background-position:center right; + border:0px; } .css_content_link_method { background-image:url(method.png); - padding-left:17px; - padding-top:1px; + display:inline-block; + padding-right:17px; background-repeat:no-repeat; + background-position:center right; + border:0px; } .css_content_link_static_method { background-image:url(staticmethod.png); - padding-left:17px; - padding-top:1px; + display:inline-block; + padding-right:17px; background-repeat:no-repeat; + background-position:center right; + border:0px; } .css_content_link_virtual_method { - background-image:url(method.png); - padding-left:17px; - padding-top:1px; + background-image:url(virtualmethod.png); + display:inline-block; + padding-right:17px; background-repeat:no-repeat; + background-position:center right; + border:0px; } .css_content_link_abstract_method { - background-image:url( abstractmethod.png ); - padding-left:17px; - padding-top:1px; + background-image:url(abstractmethod.png); + display:inline-block; + padding-right:17px; background-repeat:no-repeat; + background-position:center right; + border:0px; } .css_content_link_construction_method { - background-image:url(method.png); - padding-left:17px; - padding-top:1px; + background-image:url(constructor.png); + display:inline-block; + padding-right:17px; background-repeat:no-repeat; + background-position:center right; + border:0px; } - -.main_inline_navigation_virtual_property { - list-style-image: url(property.png); -} -.main_inline_navigation_abstract_property { - list-style-image: url(property.png); +.main_inline_navigation_virtual_method { + list-style-image:url(virtualmethod.png); } -.navi_abstract_prop { - list-style-image: url(property.png); +.main_inline_navigation_errorcode { + list-style-image:url(errorcode.png); } -.navi_virtual_prop { - list-style-image: url(property.png); +.main_inline_navigation_enumvalue { + list-style-image:url(enumvalue.png); } - .navi_abstract_class, .main_inline_navigation_abstract_class { list-style-image: url(abstractclass.png); } @@ -325,20 +397,18 @@ h3.main_title { list-style-image: url( abstractmethod.png ); } .navi_construction_method, .main_list_m, .main_inline_navigation_construction_method { - list-style-image: url(method.png); + list-style-image: url(constructor.png); } .navi_static_method, .main_inline_navigation_static_method { list-style-image: url(staticmethod.png); } - -.navi_virtual_method, .main_inline_navigation_virtual_method { - list-style-image: url(method.png); -} - .navi_package_index, .main_inline_navigation_package { list-style-image: url(packages.png); } +.navi_virtual_method { + list-style-image: url(virtualmethod.png); +} .main_navi_enval { list-style-image: url(enumvalue.png); } @@ -381,10 +451,9 @@ h3.main_title { .navi_package, .main_inline_navigation_package { list-style-image: url(package.png); } + .main_inline_navigation_constant, .navi_constant { list-style-image: url(constant.png); - text-decoration: none; - color: #214b87; } @@ -415,7 +484,6 @@ a.navi_link, a.external_link { a.navi_link:hover, a.external_link:hover { text-decoration: underline; -# color: #ff0000; } diff --git a/src/doclets/htm/deps/virtualmethod.png b/src/doclets/htm/deps/virtualmethod.png new file mode 100644 index 000000000..5ff14ecf7 Binary files /dev/null and b/src/doclets/htm/deps/virtualmethod.png differ diff --git a/src/doclets/htm/deps/virtualproperty.png b/src/doclets/htm/deps/virtualproperty.png new file mode 100644 index 000000000..795374629 Binary files /dev/null and b/src/doclets/htm/deps/virtualproperty.png differ diff --git a/src/doclets/htm/deps/warning.png b/src/doclets/htm/deps/warning.png new file mode 100644 index 000000000..ecdc0f924 Binary files /dev/null and b/src/doclets/htm/deps/warning.png differ diff --git a/src/doclets/html/doclet/Makefile.am b/src/doclets/htm/doclet/Makefile.am similarity index 67% rename from src/doclets/html/doclet/Makefile.am rename to src/doclets/htm/doclet/Makefile.am index 69b839765..ab6f93d30 100644 --- a/src/doclets/html/doclet/Makefile.am +++ b/src/doclets/htm/doclet/Makefile.am @@ -2,8 +2,9 @@ -libdoclet_VALASOURCES = \ - template.vala \ + +libdoclet_VALASOURCES = \ + template.vala \ $(NULL) @@ -11,13 +12,13 @@ BUILT_SOURCES = libdoclet.vala.stamp libdoclet.vala.stamp: $(libdoclet_VALASOURCES) - $(VALAC) -C --vapidir ../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../vapi --pkg valadoc-1.0 --vapidir ../linkhelper --pkg libhtmlhelper-1.0 --basedir . --vapidir . --pkg docletconfig --save-temps $^ + $(VALAC) -C --vapidir ../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../vapi --pkg valadoc-1.0 --pkg libxml-2.0 --vapidir . --pkg docletconfig --basedir . $^ touch $@ -docletdir = $(libdir)/valadoc/plugins/template/ +docletdir = $(libdir)/valadoc/plugins/html/ doclet_LTLIBRARIES = libdoclet.la @@ -31,12 +32,12 @@ libdoclet_la_SOURCES = \ AM_CFLAGS = -g \ - -DPACKAGE_PLUGINDIR=\"$(libdir)/valadoc/plugins/template/\" \ + -DPACKAGE_PLUGINDIR=\"$(libdir)/valadoc/plugins/html/\" \ -I ../../../libvaladoc/ \ -I ../../htmlhelpers/ \ - -I ../linkhelper/ \ -I ../ \ $(GLIB_CFLAGS) \ + $(LIBXML2_CFLAGS) \ $(LIBVALA_CFLAGS) \ $(NULL) @@ -45,9 +46,9 @@ libdoclet_la_LDFLAGS = -module -avoid-version libdoclet_la_LIBADD = \ - ../../htmlhelpers/libhtmlhelpers.la \ ../../../libvaladoc/libvaladoc.la \ - ../linkhelper/libhtmlhelper.la \ + ../../htmlhelpers/libhtmlhelpers.la \ + $(LIBXML2_LIBS) \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/html/doclet/docletconfig.vapi b/src/doclets/htm/doclet/docletconfig.vapi similarity index 100% rename from src/doclets/html/doclet/docletconfig.vapi rename to src/doclets/htm/doclet/docletconfig.vapi diff --git a/src/doclets/htm/doclet/template.vala b/src/doclets/htm/doclet/template.vala new file mode 100644 index 000000000..22408d433 --- /dev/null +++ b/src/doclets/htm/doclet/template.vala @@ -0,0 +1,285 @@ +/* + * Valadoc - a documentation tool for vala. + * Copyright (C) 2008 Florian Brosch + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + +using Valadoc; +using GLib; +using Xml; +using Gee; + + + +public class Valadoc.LangletIndex : Valadoc.BasicHtmlLanglet { + protected override string get_link ( DocumentedElement element, DocumentedElement? pos ) { + return get_html_link ( this.settings, element, pos ); + } + + public LangletIndex ( Settings settings ) { + base ( settings ); + } +} + + + + + +public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet { + private const string css_path_package = "style.css"; + private const string css_path = "../style.css"; + private string package_dir_name = ""; // remove + + private string get_real_path ( DocumentedElement element ) { + return GLib.Path.build_filename ( this.settings.get_real_path ( ), element.package.name, element.full_name () + ".html" ); + } + + public override void initialisation ( Settings settings, Tree tree ) { + this.settings = settings; + + var rt = DirUtils.create ( this.settings.path, 0777 ); + copy_directory ( GLib.Path.build_filename ( Config.doclet_path, "deps" ), this.settings.path ); + rt = DirUtils.create ( this.settings.path + settings.pkg_name, 0777 ); + + GLib.FileStream file = GLib.FileStream.open ( GLib.Path.build_filename ( this.settings.path, "index.html" ), "w" ); + this.write_file_header ( file, this.css_path_package, this.settings.pkg_name ); + this.write_navi_packages ( file, tree ); + this.write_packages_content ( file, tree ); + this.write_file_footer ( file ); + file = null; + + + this.langlet = new Valadoc.LangletIndex ( settings ); + + Gee.ReadOnlyCollection packages = tree.get_package_list (); + foreach ( Package pkg in packages ) { + pkg.visit ( this ); + } + } + + public override void visit_package ( Package file ) { + string pkg_name = file.name; + string path = GLib.Path.build_filename ( this.settings.path, pkg_name ); + this.package_dir_name = pkg_name; + + var rt = DirUtils.create ( path, 0777 ); + rt = DirUtils.create ( GLib.Path.build_filename ( path, "img" ), 0777 ); + + GLib.FileStream ifile = GLib.FileStream.open ( GLib.Path.build_filename ( path, "index.htm" ), "w" ); + this.write_file_header ( ifile, this.css_path, pkg_name ); + this.write_navi_file ( ifile, file, file ); + this.write_file_content ( ifile, file, file ); + this.write_file_footer ( ifile ); + ifile = null; + + file.visit_namespaces ( this ); + } + + public override void visit_namespace ( Namespace ns ) { + string rpath = this.get_real_path ( ns ); + + if ( ns.name != null ) { + GLib.FileStream file = GLib.FileStream.open ( rpath, "w" ); + this.write_file_header ( file, this.css_path, ns.full_name() ); + this.write_navi_namespace ( file, ns ); + this.write_namespace_content ( file, ns, ns ); + this.write_file_footer ( file ); + file = null; + } + + // file: + ns.visit_namespaces ( this ); + ns.visit_classes ( this ); + ns.visit_interfaces ( this ); + ns.visit_structs ( this ); + ns.visit_enums ( this ); + ns.visit_error_domains ( this ); + ns.visit_delegates ( this ); + ns.visit_methods ( this ); + ns.visit_fields ( this ); + ns.visit_constants ( this ); + } + + public override void visit_interface ( Interface iface ) { + string rpath = this.get_real_path ( iface ); + + iface.visit_classes ( this ); + iface.visit_structs ( this ); + iface.visit_delegates ( this ); + iface.visit_methods ( this ); + iface.visit_signals ( this ); + iface.visit_properties ( this ); + iface.visit_fields ( this ); + + GLib.FileStream file = GLib.FileStream.open ( rpath, "w"); + this.write_file_header ( file, this.css_path, iface.full_name() ); + this.write_navi_interface ( file, iface, iface ); + this.write_interface_content ( file, iface, iface ); + this.write_file_footer ( file ); + file = null; + } + + public override void visit_class ( Class cl ) { + string rpath = this.get_real_path ( cl ); + + cl.visit_construction_methods ( this ); + cl.visit_classes ( this ); + cl.visit_structs ( this ); + cl.visit_enums ( this ); + cl.visit_delegates ( this ); + cl.visit_methods ( this ); + cl.visit_signals ( this ); + cl.visit_properties ( this ); + cl.visit_fields ( this ); + cl.visit_constants ( this ); + + GLib.FileStream file = GLib.FileStream.open ( rpath, "w"); + this.write_file_header ( file, this.css_path, cl.full_name() ); + this.write_navi_class ( file, cl, cl ); + this.write_class_content ( file, cl, cl ); + this.write_file_footer ( file ); + file = null; + } + + public override void visit_struct ( Struct stru ) { + string rpath = this.get_real_path ( stru ); + + stru.visit_construction_methods ( this ); + stru.visit_methods ( this ); + stru.visit_fields ( this ); + stru.visit_constants ( this ); + + GLib.FileStream file = GLib.FileStream.open ( rpath, "w"); + this.write_file_header ( file, this.css_path, stru.full_name() ); + this.write_navi_struct ( file, stru, stru ); + this.write_struct_content ( file, stru, stru ); + this.write_file_footer ( file ); + file = null; + } + + public override void visit_error_domain ( ErrorDomain errdom ) { + string rpath = this.get_real_path ( errdom ); + + errdom.visit_methods ( this ); + + GLib.FileStream file = GLib.FileStream.open ( rpath, "w"); + this.write_file_header ( file, this.css_path, errdom.full_name() ); + this.write_navi_error_domain ( file, errdom, errdom ); + this.write_error_domain_content ( file, errdom, errdom ); + this.write_file_footer ( file ); + file = null; + } + + public override void visit_enum ( Enum en ) { + string rpath = this.get_real_path ( en ); + + en.visit_enum_values ( this ); + en.visit_methods ( this ); + + GLib.FileStream file = GLib.FileStream.open ( rpath, "w"); + this.write_file_header ( file, this.css_path, en.full_name() ); + this.write_navi_enum ( file, en, en ); + this.write_enum_content ( file, en, en ); + this.write_file_footer ( file ); + file = null; + } + + public override void visit_property ( Property prop ) { + string rpath = this.get_real_path ( prop ); + + GLib.FileStream file = GLib.FileStream.open ( rpath, "w"); + this.write_file_header ( file, this.css_path, prop.full_name() ); + this.write_navi_property ( file, prop ); + this.write_property_content ( file, prop ); + this.write_file_footer ( file ); + file = null; + } + + public override void visit_constant ( Constant constant, ConstantHandler parent ) { + string rpath = this.get_real_path ( constant ); + + GLib.FileStream file = GLib.FileStream.open ( rpath, "w"); + this.write_file_header ( file, this.css_path, constant.full_name() ); + this.write_navi_constant ( file, constant ); + this.write_constant_content ( file, constant, parent ); + this.write_file_footer ( file ); + file = null; + } + + public override void visit_field ( Field field, FieldHandler parent ) { + string rpath = this.get_real_path ( field ); + + GLib.FileStream file = GLib.FileStream.open ( rpath, "w"); + this.write_file_header ( file, this.css_path, field.full_name() ); + this.write_navi_field ( file, field ); + this.write_field_content ( file, field, parent ); + this.write_file_footer ( file ); + file = null; + } + + public override void visit_error_code ( ErrorCode errcode ) { + } + + public override void visit_enum_value ( EnumValue enval ) { + } + + public override void visit_delegate ( Delegate del ) { + string rpath = this.get_real_path ( del ); + + GLib.FileStream file = GLib.FileStream.open ( rpath, "w"); + this.write_file_header ( file, this.css_path, del.full_name() ); + this.write_navi_delegate ( file, del ); + this.write_delegate_content ( file, del ); + this.write_file_footer ( file ); + file = null; + } + + public override void visit_signal ( Signal sig ) { + string rpath = this.get_real_path ( sig ); + + GLib.FileStream file = GLib.FileStream.open ( rpath, "w"); + this.write_file_header ( file, this.css_path, sig.full_name() ); + this.write_navi_signal ( file, sig ); + write_signal_content ( file, sig ); + this.write_file_footer ( file ); + file = null; + } + + public override void visit_method ( Method m, Valadoc.MethodHandler parent ) { + string rpath = this.get_real_path ( m ); + + GLib.FileStream file = GLib.FileStream.open ( rpath, "w"); + this.write_file_header ( file, this.css_path, m.full_name() ); + this.write_navi_method ( file, m ); + this.write_method_content ( file, m, parent ); + this.write_file_footer ( file ); + file = null; + } + + public override void cleanups () { + } +} + + + + + +[ModuleInit] +public Type register_plugin ( ) { + return typeof ( Valadoc.HtmlDoclet ); +} + diff --git a/src/doclets/html/taglets/Makefile.am b/src/doclets/htm/taglets/Makefile.am similarity index 100% rename from src/doclets/html/taglets/Makefile.am rename to src/doclets/htm/taglets/Makefile.am index 2ef6ebed5..c2056d401 100644 --- a/src/doclets/html/taglets/Makefile.am +++ b/src/doclets/htm/taglets/Makefile.am @@ -4,24 +4,24 @@ NULL = SUBDIRS = \ + image \ see \ link \ - image \ center \ right \ italic \ - underline \ - return \ bold \ source \ + underline \ + return \ + string \ + throws \ notification\ + version \ table \ cell \ list \ listelement\ - string \ - throws \ - version \ parameter \ wikilink \ $(NULL) diff --git a/src/doclets/html/taglets/bold/Makefile.am b/src/doclets/htm/taglets/bold/Makefile.am similarity index 79% rename from src/doclets/html/taglets/bold/Makefile.am rename to src/doclets/htm/taglets/bold/Makefile.am index 3796538e4..91f5c152b 100755 --- a/src/doclets/html/taglets/bold/Makefile.am +++ b/src/doclets/htm/taglets/bold/Makefile.am @@ -11,13 +11,13 @@ BUILT_SOURCES = libtagletbold.vala.stamp libtagletbold.vala.stamp: $(libtagletbold_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ -tagletbolddir = $(libdir)/valadoc/plugins/template/taglets/ +tagletbolddir = $(libdir)/valadoc/plugins/html/taglets/ tagletbold_LTLIBRARIES = libtagletbold.la @@ -33,7 +33,6 @@ libtagletbold_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletbold_la_LDFLAGS = -module -avoid-version libtagletbold_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/html/taglets/bold/taglet.vala b/src/doclets/htm/taglets/bold/taglet.vala similarity index 100% rename from src/doclets/html/taglets/bold/taglet.vala rename to src/doclets/htm/taglets/bold/taglet.vala diff --git a/src/doclets/html/taglets/cell/Makefile.am b/src/doclets/htm/taglets/cell/Makefile.am similarity index 80% rename from src/doclets/html/taglets/cell/Makefile.am rename to src/doclets/htm/taglets/cell/Makefile.am index e8b1dc938..e73c38a8d 100755 --- a/src/doclets/html/taglets/cell/Makefile.am +++ b/src/doclets/htm/taglets/cell/Makefile.am @@ -11,13 +11,13 @@ BUILT_SOURCES = libtaglettablecell.vala.stamp libtaglettablecell.vala.stamp: $(libtaglettablecell_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ -taglettablecelldir = $(libdir)/valadoc/plugins/template/taglets/ +taglettablecelldir = $(libdir)/valadoc/plugins/html/taglets/ taglettablecell_LTLIBRARIES = libtaglettablecell.la @@ -33,7 +33,6 @@ libtaglettablecell_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtaglettablecell_la_LDFLAGS = -module -avoid-version libtaglettablecell_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/html/taglets/cell/taglet.vala b/src/doclets/htm/taglets/cell/taglet.vala similarity index 100% rename from src/doclets/html/taglets/cell/taglet.vala rename to src/doclets/htm/taglets/cell/taglet.vala diff --git a/src/doclets/html/taglets/center/Makefile.am b/src/doclets/htm/taglets/center/Makefile.am similarity index 76% rename from src/doclets/html/taglets/center/Makefile.am rename to src/doclets/htm/taglets/center/Makefile.am index 9106990fb..0d16b6e38 100755 --- a/src/doclets/html/taglets/center/Makefile.am +++ b/src/doclets/htm/taglets/center/Makefile.am @@ -11,15 +11,15 @@ BUILT_SOURCES = libtagletcenter.vala.stamp libtagletcenter.vala.stamp: $(libtagletcenter_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ -tagletimagedir = $(libdir)/valadoc/plugins/template/taglets/ +tagletcenterdir = $(libdir)/valadoc/plugins/html/taglets/ -tagletimage_LTLIBRARIES = libtagletcenter.la +tagletcenter_LTLIBRARIES = libtagletcenter.la libtagletcenter_la_SOURCES = \ @@ -33,7 +33,6 @@ libtagletcenter_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletcenter_la_LDFLAGS = -module -avoid-version libtagletcenter_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/html/taglets/center/taglet.vala b/src/doclets/htm/taglets/center/taglet.vala similarity index 100% rename from src/doclets/html/taglets/center/taglet.vala rename to src/doclets/htm/taglets/center/taglet.vala diff --git a/src/doclets/html/taglets/image/Makefile.am b/src/doclets/htm/taglets/image/Makefile.am similarity index 80% rename from src/doclets/html/taglets/image/Makefile.am rename to src/doclets/htm/taglets/image/Makefile.am index 71a91f172..78559a8cb 100755 --- a/src/doclets/html/taglets/image/Makefile.am +++ b/src/doclets/htm/taglets/image/Makefile.am @@ -11,13 +11,13 @@ BUILT_SOURCES = libtagletimage.vala.stamp libtagletimage.vala.stamp: $(libtagletimage_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ -tagletimagedir = $(libdir)/valadoc/plugins/template/taglets/ +tagletimagedir = $(libdir)/valadoc/plugins/html/taglets/ tagletimage_LTLIBRARIES = libtagletimage.la @@ -33,7 +33,6 @@ libtagletimage_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletimage_la_LDFLAGS = -module -avoid-version libtagletimage_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/html/taglets/image/taglet.vala b/src/doclets/htm/taglets/image/taglet.vala similarity index 100% rename from src/doclets/html/taglets/image/taglet.vala rename to src/doclets/htm/taglets/image/taglet.vala diff --git a/src/doclets/html/taglets/italic/Makefile.am b/src/doclets/htm/taglets/italic/Makefile.am similarity index 80% rename from src/doclets/html/taglets/italic/Makefile.am rename to src/doclets/htm/taglets/italic/Makefile.am index 6bff04ac2..f4afb4ee8 100755 --- a/src/doclets/html/taglets/italic/Makefile.am +++ b/src/doclets/htm/taglets/italic/Makefile.am @@ -11,13 +11,13 @@ BUILT_SOURCES = libtagletitalic.vala.stamp libtagletitalic.vala.stamp: $(libtagletitalic_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ -tagletitalicdir = $(libdir)/valadoc/plugins/template/taglets/ +tagletitalicdir = $(libdir)/valadoc/plugins/html/taglets/ tagletitalic_LTLIBRARIES = libtagletitalic.la @@ -33,7 +33,6 @@ libtagletitalic_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletitalic_la_LDFLAGS = -module -avoid-version libtagletitalic_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/html/taglets/italic/taglet.vala b/src/doclets/htm/taglets/italic/taglet.vala similarity index 100% rename from src/doclets/html/taglets/italic/taglet.vala rename to src/doclets/htm/taglets/italic/taglet.vala diff --git a/src/doclets/html/taglets/link/Makefile.am b/src/doclets/htm/taglets/link/Makefile.am similarity index 79% rename from src/doclets/html/taglets/link/Makefile.am rename to src/doclets/htm/taglets/link/Makefile.am index c2c9e5c51..31a125e7e 100644 --- a/src/doclets/html/taglets/link/Makefile.am +++ b/src/doclets/htm/taglets/link/Makefile.am @@ -11,13 +11,13 @@ BUILT_SOURCES = libtagletlink.vala.stamp libtagletlink.vala.stamp: $(libtagletlink_VALASOURCES) - $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^ touch $@ -tagletlinkdir = $(libdir)/valadoc/plugins/template/taglets/ +tagletlinkdir = $(libdir)/valadoc/plugins/html/taglets/ tagletlink_LTLIBRARIES = libtagletlink.la @@ -33,7 +33,6 @@ libtagletlink_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletlink_la_LDFLAGS = -module -avoid-version libtagletlink_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/html/taglets/link/taglet.vala b/src/doclets/htm/taglets/link/taglet.vala similarity index 95% rename from src/doclets/html/taglets/link/taglet.vala rename to src/doclets/htm/taglets/link/taglet.vala index 2205c89c3..5de30aead 100644 --- a/src/doclets/html/taglets/link/taglet.vala +++ b/src/doclets/htm/taglets/link/taglet.vala @@ -23,9 +23,10 @@ using Vala; using Gee; -public class Valadoc.LinkHtmlTaglet : Valadoc.LinkHtmlHelperTaglet, LinkHelper { + +public class Valadoc.LinkHtmlTaglet : Valadoc.LinkHtmlHelperTaglet { protected override string? get_link ( Settings settings, Tree tree, DocumentedElement element, DocumentedElement? pos ) { - return this.get_html_link ( settings, element, pos ); + return get_html_link ( settings, element, pos ); } public override string to_string () { diff --git a/src/doclets/html/taglets/list/Makefile.am b/src/doclets/htm/taglets/list/Makefile.am similarity index 76% rename from src/doclets/html/taglets/list/Makefile.am rename to src/doclets/htm/taglets/list/Makefile.am index 6fea88a49..e9cf6cc75 100755 --- a/src/doclets/html/taglets/list/Makefile.am +++ b/src/doclets/htm/taglets/list/Makefile.am @@ -11,15 +11,15 @@ BUILT_SOURCES = libtagletlist.vala.stamp libtagletlist.vala.stamp: $(libtagletlist_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ -tagletimagedir = $(libdir)/valadoc/plugins/template/taglets/ +tagletlistdir = $(libdir)/valadoc/plugins/html/taglets/ -tagletimage_LTLIBRARIES = libtagletlist.la +tagletlist_LTLIBRARIES = libtagletlist.la libtagletlist_la_SOURCES = \ @@ -33,7 +33,6 @@ libtagletlist_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletlist_la_LDFLAGS = -module -avoid-version libtagletlist_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/html/taglets/list/taglet.vala b/src/doclets/htm/taglets/list/taglet.vala similarity index 100% rename from src/doclets/html/taglets/list/taglet.vala rename to src/doclets/htm/taglets/list/taglet.vala diff --git a/src/doclets/html/taglets/listelement/Makefile.am b/src/doclets/htm/taglets/listelement/Makefile.am similarity index 76% rename from src/doclets/html/taglets/listelement/Makefile.am rename to src/doclets/htm/taglets/listelement/Makefile.am index 2c7dcff38..6a05a1c53 100755 --- a/src/doclets/html/taglets/listelement/Makefile.am +++ b/src/doclets/htm/taglets/listelement/Makefile.am @@ -11,15 +11,15 @@ BUILT_SOURCES = libtagletlistelement.vala.stamp libtagletlistelement.vala.stamp: $(libtagletlistelement_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ -tagletlistelementdir = $(libdir)/valadoc/plugins/template/taglets/ +tagletimagedir = $(libdir)/valadoc/plugins/html/taglets/ -tagletlistelement_LTLIBRARIES = libtagletlistelement.la +tagletimage_LTLIBRARIES = libtagletlistelement.la libtagletlistelement_la_SOURCES = \ @@ -33,7 +33,6 @@ libtagletlistelement_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletlistelement_la_LDFLAGS = -module -avoid-version libtagletlistelement_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/html/taglets/listelement/taglet.vala b/src/doclets/htm/taglets/listelement/taglet.vala similarity index 100% rename from src/doclets/html/taglets/listelement/taglet.vala rename to src/doclets/htm/taglets/listelement/taglet.vala diff --git a/src/doclets/html/taglets/notification/Makefile.am b/src/doclets/htm/taglets/notification/Makefile.am similarity index 80% rename from src/doclets/html/taglets/notification/Makefile.am rename to src/doclets/htm/taglets/notification/Makefile.am index bb7743b49..79b940eb8 100755 --- a/src/doclets/html/taglets/notification/Makefile.am +++ b/src/doclets/htm/taglets/notification/Makefile.am @@ -11,13 +11,13 @@ BUILT_SOURCES = libtagletnotification.vala.stamp libtagletnotification.vala.stamp: $(libtagletnotification_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . --save-temps $^ touch $@ -tagletnotificationdir = $(libdir)/valadoc/plugins/template/taglets/ +tagletnotificationdir = $(libdir)/valadoc/plugins/html/taglets/ tagletnotification_LTLIBRARIES = libtagletnotification.la @@ -33,7 +33,6 @@ libtagletnotification_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletnotification_la_LDFLAGS = -module -avoid-version libtagletnotification_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/html/taglets/notification/taglet.vala b/src/doclets/htm/taglets/notification/taglet.vala similarity index 100% rename from src/doclets/html/taglets/notification/taglet.vala rename to src/doclets/htm/taglets/notification/taglet.vala diff --git a/src/doclets/html/taglets/parameter/Makefile.am b/src/doclets/htm/taglets/parameter/Makefile.am similarity index 80% rename from src/doclets/html/taglets/parameter/Makefile.am rename to src/doclets/htm/taglets/parameter/Makefile.am index 44fa188fc..ddd616ea6 100644 --- a/src/doclets/html/taglets/parameter/Makefile.am +++ b/src/doclets/htm/taglets/parameter/Makefile.am @@ -11,13 +11,13 @@ BUILT_SOURCES = libtagletparameter.vala.stamp libtagletparameter.vala.stamp: $(libtagletparameter_VALASOURCES) - $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^ touch $@ -tagletparameterdir = $(libdir)/valadoc/plugins/template/taglets/ +tagletparameterdir = $(libdir)/valadoc/plugins/html/taglets/ tagletparameter_LTLIBRARIES = libtagletparameter.la @@ -33,7 +33,6 @@ libtagletparameter_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletparameter_la_LDFLAGS = -module -avoid-version libtagletparameter_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/html/taglets/parameter/taglet.vala b/src/doclets/htm/taglets/parameter/taglet.vala similarity index 100% rename from src/doclets/html/taglets/parameter/taglet.vala rename to src/doclets/htm/taglets/parameter/taglet.vala diff --git a/src/doclets/htm/taglets/return/Makefile.am b/src/doclets/htm/taglets/return/Makefile.am new file mode 100644 index 000000000..071ead5b5 --- /dev/null +++ b/src/doclets/htm/taglets/return/Makefile.am @@ -0,0 +1,55 @@ +# src/Makefile.am + + + +libtagletreturn_VALASOURCES = \ + taglet.vala \ + $(NULL) + + +BUILT_SOURCES = libtagletreturn.vala.stamp + + +libtagletreturn.vala.stamp: $(libtagletreturn_VALASOURCES) + $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^ + touch $@ + + + + +tagletXXXXdir = $(libdir)/valadoc/plugins/html/taglets/ + +tagletXXXX_LTLIBRARIES = libtagletreturn.la + + +libtagletreturn_la_SOURCES = \ + libtagletreturn.vala.stamp \ + $(libtagletreturn_VALASOURCES:.vala=.c) \ + $(libtagletreturn_VALASOURCES:.vala=.h) \ + $(NULL) + + + +AM_CFLAGS = -g \ + -I ../../../../libvaladoc/ \ + -I ../../../htmlhelpers/ \ + -I ../../ \ + $(GLIB_CFLAGS) \ + $(LIBVALA_CFLAGS) \ + $(NULL) + + +libtagletreturn_la_LDFLAGS = -module -avoid-version + + +libtagletreturn_la_LIBADD = \ + ../../../../libvaladoc/libvaladoc.la \ + ../../../htmlhelpers/libhtmlhelpers.la \ + $(GLIB_LIBS) \ + $(LIBVALA_LIBS) \ + $(NULL) + + + + +EXTRA_DIST = $(libtagletreturn_VALASOURCES) libtagletreturn.vala.stamp diff --git a/src/doclets/html/taglets/return/taglet.vala b/src/doclets/htm/taglets/return/taglet.vala similarity index 99% rename from src/doclets/html/taglets/return/taglet.vala rename to src/doclets/htm/taglets/return/taglet.vala index 1399b6f4f..d6fd552fc 100644 --- a/src/doclets/html/taglets/return/taglet.vala +++ b/src/doclets/htm/taglets/return/taglet.vala @@ -24,9 +24,11 @@ using Gee; + [ModuleInit] public GLib.Type register_plugin ( Gee.HashMap taglets ) { GLib.Type type = typeof ( ReturnHtmlTaglet ); taglets.set ( "return", type ); return type; } + diff --git a/src/doclets/html/taglets/right/Makefile.am b/src/doclets/htm/taglets/right/Makefile.am similarity index 80% rename from src/doclets/html/taglets/right/Makefile.am rename to src/doclets/htm/taglets/right/Makefile.am index 19ebe8d53..ee144b5b7 100755 --- a/src/doclets/html/taglets/right/Makefile.am +++ b/src/doclets/htm/taglets/right/Makefile.am @@ -11,13 +11,13 @@ BUILT_SOURCES = libtagletright.vala.stamp libtagletright.vala.stamp: $(libtagletright_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ -tagletrightdir = $(libdir)/valadoc/plugins/template/taglets/ +tagletrightdir = $(libdir)/valadoc/plugins/html/taglets/ tagletright_LTLIBRARIES = libtagletright.la @@ -33,7 +33,6 @@ libtagletright_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletright_la_LDFLAGS = -module -avoid-version libtagletright_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/html/taglets/right/taglet.vala b/src/doclets/htm/taglets/right/taglet.vala similarity index 100% rename from src/doclets/html/taglets/right/taglet.vala rename to src/doclets/htm/taglets/right/taglet.vala diff --git a/src/doclets/html/taglets/see/Makefile.am b/src/doclets/htm/taglets/see/Makefile.am similarity index 67% rename from src/doclets/html/taglets/see/Makefile.am rename to src/doclets/htm/taglets/see/Makefile.am index 8f91b7142..cc332c34e 100644 --- a/src/doclets/html/taglets/see/Makefile.am +++ b/src/doclets/htm/taglets/see/Makefile.am @@ -11,13 +11,13 @@ BUILT_SOURCES = libtagletsee.vala.stamp libtagletsee.vala.stamp: $(libtagletsee_VALASOURCES) - $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^ touch $@ + - -tagletseedir = $(libdir)/valadoc/plugins/template/taglets/ +tagletseedir = $(libdir)/valadoc/plugins/html/taglets/ tagletsee_LTLIBRARIES = libtagletsee.la @@ -33,7 +33,6 @@ libtagletsee_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -43,12 +42,11 @@ AM_CFLAGS = -g \ libtagletsee_la_LDFLAGS = -module -avoid-version -libtagletsee_la_LIBADD = \ - ../../../../libvaladoc/libvaladoc.la \ +libtagletsee_la_LIBADD = \ + ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ - $(GLIB_LIBS) \ - $(LIBVALA_LIBS) \ + $(GLIB_LIBS) \ + $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/html/taglets/see/taglet.vala b/src/doclets/htm/taglets/see/taglet.vala similarity index 90% rename from src/doclets/html/taglets/see/taglet.vala rename to src/doclets/htm/taglets/see/taglet.vala index f0f74aced..a7b5d80b3 100644 --- a/src/doclets/html/taglets/see/taglet.vala +++ b/src/doclets/htm/taglets/see/taglet.vala @@ -24,9 +24,9 @@ using Gee; -public class Valadoc.SeeHtmlTaglet : SeeHtmlHelperTaglet, LinkHelper { +public class Valadoc.SeeDevhelpTaglet : SeeHtmlHelperTaglet { protected override string? get_link ( Settings settings, Tree tree, DocumentedElement element, DocumentedElement? pos ) { - return this.get_html_link ( settings, element, pos ); + return get_html_link ( settings, element, pos ); } public override bool write_block_start ( void* ptr ) { @@ -51,7 +51,8 @@ public class Valadoc.SeeHtmlTaglet : SeeHtmlHelperTaglet, LinkHelper { [ModuleInit] public GLib.Type register_plugin ( Gee.HashMap taglets ) { - GLib.Type type = typeof ( SeeHtmlTaglet ); + GLib.Type type = typeof ( SeeDevhelpTaglet ); taglets.set ( "see", type ); return type; } + diff --git a/src/doclets/html/taglets/source/Makefile.am b/src/doclets/htm/taglets/source/Makefile.am similarity index 80% rename from src/doclets/html/taglets/source/Makefile.am rename to src/doclets/htm/taglets/source/Makefile.am index 6c989a189..52b3b8575 100755 --- a/src/doclets/html/taglets/source/Makefile.am +++ b/src/doclets/htm/taglets/source/Makefile.am @@ -11,13 +11,13 @@ BUILT_SOURCES = libtagletsrcsample.vala.stamp libtagletsrcsample.vala.stamp: $(libtagletsrcsample_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ -tagletsrcsampledir = $(libdir)/valadoc/plugins/template/taglets/ +tagletsrcsampledir = $(libdir)/valadoc/plugins/html/taglets/ tagletsrcsample_LTLIBRARIES = libtagletsrcsample.la @@ -33,7 +33,6 @@ libtagletsrcsample_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletsrcsample_la_LDFLAGS = -module -avoid-version libtagletsrcsample_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/html/taglets/source/taglet.vala b/src/doclets/htm/taglets/source/taglet.vala similarity index 100% rename from src/doclets/html/taglets/source/taglet.vala rename to src/doclets/htm/taglets/source/taglet.vala diff --git a/src/doclets/htm/taglets/string/Makefile.am b/src/doclets/htm/taglets/string/Makefile.am new file mode 100644 index 000000000..e438661ab --- /dev/null +++ b/src/doclets/htm/taglets/string/Makefile.am @@ -0,0 +1,55 @@ +# src/Makefile.am + + + +libtagletstring_VALASOURCES = \ + taglet.vala \ + $(NULL) + + +BUILT_SOURCES = libtagletstring.vala.stamp + + +libtagletstring.vala.stamp: $(libtagletstring_VALASOURCES) + $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^ + touch $@ + + + + +tagletstringdir = $(libdir)/valadoc/plugins/html/taglets/ + +tagletstring_LTLIBRARIES = libtagletstring.la + + +libtagletstring_la_SOURCES = \ + libtagletstring.vala.stamp \ + $(libtagletstring_VALASOURCES:.vala=.c) \ + $(libtagletstring_VALASOURCES:.vala=.h) \ + $(NULL) + + + +AM_CFLAGS = -g \ + -I ../../../../libvaladoc/ \ + -I ../../../htmlhelpers/ \ + -I ../../ \ + $(GLIB_CFLAGS) \ + $(LIBVALA_CFLAGS) \ + $(NULL) + + +libtagletstring_la_LDFLAGS = -module -avoid-version + + +libtagletstring_la_LIBADD = \ + ../../../../libvaladoc/libvaladoc.la \ + ../../../htmlhelpers/libhtmlhelpers.la \ + $(GLIB_LIBS) \ + $(LIBVALA_LIBS) \ + $(NULL) + + + + +EXTRA_DIST = $(libtagletstring_VALASOURCES) libtagletstring.vala.stamp diff --git a/src/doclets/html/taglets/string/taglet.vala b/src/doclets/htm/taglets/string/taglet.vala similarity index 91% rename from src/doclets/html/taglets/string/taglet.vala rename to src/doclets/htm/taglets/string/taglet.vala index 2a49d8577..a8ebdea71 100644 --- a/src/doclets/html/taglets/string/taglet.vala +++ b/src/doclets/htm/taglets/string/taglet.vala @@ -24,10 +24,14 @@ using Gee; + + [ModuleInit] public GLib.Type register_plugin ( Gee.HashMap taglets ) { - GLib.Type type = typeof ( ExceptionHtmlTaglet ); - taglets.set ( "throws", type ); + GLib.Type type = typeof ( StringHtmlTaglet ); + taglets.set ( "", type ); return type; } + + diff --git a/src/doclets/html/taglets/table/Makefile.am b/src/doclets/htm/taglets/table/Makefile.am similarity index 76% rename from src/doclets/html/taglets/table/Makefile.am rename to src/doclets/htm/taglets/table/Makefile.am index 77f496af3..323543697 100755 --- a/src/doclets/html/taglets/table/Makefile.am +++ b/src/doclets/htm/taglets/table/Makefile.am @@ -11,15 +11,15 @@ BUILT_SOURCES = libtaglettable.vala.stamp libtaglettable.vala.stamp: $(libtaglettable_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ -taglettabledir = $(libdir)/valadoc/plugins/template/taglets/ +tagletimagedir = $(libdir)/valadoc/plugins/html/taglets/ -taglettable_LTLIBRARIES = libtaglettable.la +tagletimage_LTLIBRARIES = libtaglettable.la libtaglettable_la_SOURCES = \ @@ -33,7 +33,6 @@ libtaglettable_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtaglettable_la_LDFLAGS = -module -avoid-version libtaglettable_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/html/taglets/table/taglet.vala b/src/doclets/htm/taglets/table/taglet.vala similarity index 100% rename from src/doclets/html/taglets/table/taglet.vala rename to src/doclets/htm/taglets/table/taglet.vala diff --git a/src/doclets/html/taglets/string/Makefile.am b/src/doclets/htm/taglets/throws/Makefile.am similarity index 80% rename from src/doclets/html/taglets/string/Makefile.am rename to src/doclets/htm/taglets/throws/Makefile.am index 247d42099..209613390 100644 --- a/src/doclets/html/taglets/string/Makefile.am +++ b/src/doclets/htm/taglets/throws/Makefile.am @@ -11,13 +11,13 @@ BUILT_SOURCES = libexceptionparameter.vala.stamp libexceptionparameter.vala.stamp: $(libexceptionparameter_VALASOURCES) - $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^ touch $@ -exceptionparameterdir = $(libdir)/valadoc/plugins/template/taglets/ +exceptionparameterdir = $(libdir)/valadoc/plugins/html/taglets/ exceptionparameter_LTLIBRARIES = libexceptionparameter.la @@ -33,7 +33,6 @@ libexceptionparameter_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libexceptionparameter_la_LDFLAGS = -module -avoid-version libexceptionparameter_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/html/taglets/throws/taglet.vala b/src/doclets/htm/taglets/throws/taglet.vala similarity index 99% rename from src/doclets/html/taglets/throws/taglet.vala rename to src/doclets/htm/taglets/throws/taglet.vala index 2a49d8577..d05e91dce 100644 --- a/src/doclets/html/taglets/throws/taglet.vala +++ b/src/doclets/htm/taglets/throws/taglet.vala @@ -31,3 +31,4 @@ public GLib.Type register_plugin ( Gee.HashMap taglets ) { return type; } + diff --git a/src/doclets/html/taglets/underline/Makefile.am b/src/doclets/htm/taglets/underline/Makefile.am similarity index 80% rename from src/doclets/html/taglets/underline/Makefile.am rename to src/doclets/htm/taglets/underline/Makefile.am index 280847426..b96e445e5 100755 --- a/src/doclets/html/taglets/underline/Makefile.am +++ b/src/doclets/htm/taglets/underline/Makefile.am @@ -11,13 +11,12 @@ BUILT_SOURCES = libtagletunderline.vala.stamp libtagletunderline.vala.stamp: $(libtagletunderline_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ - -tagletunderlinedir = $(libdir)/valadoc/plugins/template/taglets/ +tagletunderlinedir = $(libdir)/valadoc/plugins/html/taglets/ tagletunderline_LTLIBRARIES = libtagletunderline.la @@ -33,7 +32,6 @@ libtagletunderline_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +44,6 @@ libtagletunderline_la_LDFLAGS = -module -avoid-version libtagletunderline_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/html/taglets/underline/taglet.vala b/src/doclets/htm/taglets/underline/taglet.vala similarity index 100% rename from src/doclets/html/taglets/underline/taglet.vala rename to src/doclets/htm/taglets/underline/taglet.vala diff --git a/src/doclets/html/taglets/version/Makefile.am b/src/doclets/htm/taglets/version/Makefile.am similarity index 75% rename from src/doclets/html/taglets/version/Makefile.am rename to src/doclets/htm/taglets/version/Makefile.am index d29a29c1b..dd3d389b7 100644 --- a/src/doclets/html/taglets/version/Makefile.am +++ b/src/doclets/htm/taglets/version/Makefile.am @@ -11,13 +11,13 @@ BUILT_SOURCES = libtagletversion.vala.stamp libtagletversion.vala.stamp: $(libtagletversion_VALASOURCES) - $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../htmlhelpers --vapidir ../../../../vapi --pkg valadoc-1.0 --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ -tagletversiondir = $(libdir)/valadoc/plugins/template/taglets/ +tagletversiondir = $(libdir)/valadoc/plugins/html/taglets/ tagletversion_LTLIBRARIES = libtagletversion.la @@ -33,7 +33,6 @@ libtagletversion_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletversion_la_LDFLAGS = -module -avoid-version libtagletversion_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/html/taglets/version/taglet.vala b/src/doclets/htm/taglets/version/taglet.vala similarity index 99% rename from src/doclets/html/taglets/version/taglet.vala rename to src/doclets/htm/taglets/version/taglet.vala index 14c630c6c..3c8dcd347 100644 --- a/src/doclets/html/taglets/version/taglet.vala +++ b/src/doclets/htm/taglets/version/taglet.vala @@ -23,6 +23,8 @@ using Vala; using Gee; + + [ModuleInit] public GLib.Type register_plugin ( Gee.HashMap taglets ) { GLib.Type type = typeof ( SinceHtmlTaglet ); @@ -30,3 +32,5 @@ public GLib.Type register_plugin ( Gee.HashMap taglets ) { return type; } + + diff --git a/src/doclets/html/taglets/wikilink/Makefile.am b/src/doclets/htm/taglets/wikilink/Makefile.am similarity index 80% rename from src/doclets/html/taglets/wikilink/Makefile.am rename to src/doclets/htm/taglets/wikilink/Makefile.am index e7f17879e..c518a09be 100755 --- a/src/doclets/html/taglets/wikilink/Makefile.am +++ b/src/doclets/htm/taglets/wikilink/Makefile.am @@ -11,13 +11,13 @@ BUILT_SOURCES = libtagletwikilink.vala.stamp libtagletwikilink.vala.stamp: $(libtagletwikilink_VALASOURCES) - $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ + $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^ touch $@ -tagletwikilinkdir = $(libdir)/valadoc/plugins/template/taglets/ +tagletwikilinkdir = $(libdir)/valadoc/plugins/html/taglets/ tagletwikilink_LTLIBRARIES = libtagletwikilink.la @@ -33,7 +33,6 @@ libtagletwikilink_la_SOURCES = \ AM_CFLAGS = -g \ -I ../../../../libvaladoc/ \ -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ -I ../../ \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ @@ -46,7 +45,6 @@ libtagletwikilink_la_LDFLAGS = -module -avoid-version libtagletwikilink_la_LIBADD = \ ../../../../libvaladoc/libvaladoc.la \ ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(NULL) diff --git a/src/doclets/html/taglets/wikilink/taglet.vala b/src/doclets/htm/taglets/wikilink/taglet.vala similarity index 100% rename from src/doclets/html/taglets/wikilink/taglet.vala rename to src/doclets/htm/taglets/wikilink/taglet.vala diff --git a/src/doclets/html/deps/constant.png b/src/doclets/html/deps/constant.png deleted file mode 100644 index 5515f7e66..000000000 Binary files a/src/doclets/html/deps/constant.png and /dev/null differ diff --git a/src/doclets/html/deps/enumvalue.png b/src/doclets/html/deps/enumvalue.png deleted file mode 100644 index 08dcb8a00..000000000 Binary files a/src/doclets/html/deps/enumvalue.png and /dev/null differ diff --git a/src/doclets/html/deps/errorcode.png b/src/doclets/html/deps/errorcode.png deleted file mode 100644 index 08dcb8a00..000000000 Binary files a/src/doclets/html/deps/errorcode.png and /dev/null differ diff --git a/src/doclets/html/doclet/template.vala b/src/doclets/html/doclet/template.vala deleted file mode 100644 index 818874ca8..000000000 --- a/src/doclets/html/doclet/template.vala +++ /dev/null @@ -1,458 +0,0 @@ -/* - * Valadoc - a documentation tool for vala. - * Copyright (C) 2008 Florian Brosch - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -using Valadoc; -using GLib; -using Gee; - - - - - -public class Valadoc.LangletIndex : Valadoc.BasicHtmlLanglet, Valadoc.LinkHelper { - protected override string get_link ( DocumentedElement element, DocumentedElement? pos ) { - return this.get_html_link ( this.settings, element, pos ); - } - - public LangletIndex ( Settings settings ) { - base ( settings ); - } -} - - - - - - -public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper { - private string current_path = null; - private string package_name = null; - private bool is_vapi = false; - - private int directory_level = 1; - - private string get_css_link ( ) { - GLib.StringBuilder css_path = new GLib.StringBuilder ( ); - for ( int i = 0; this.directory_level > i; i++ ) { - css_path.append ( "../" ); - } - css_path.append ( "main.css" ); - return css_path.str; - } - - protected override string get_link ( DocumentedElement element, DocumentedElement? pos ) { - return this.get_html_link ( this.settings, element, pos ); - } - - protected override void write_top_element ( GLib.FileStream file, DocumentedElement? pos ) { - string top = ""; - - if ( pos != null ) - top = get_html_top_link ( pos ) ; - - this.write_top_element_template ( file, top+"packages.html" ); - } - - -/* - private string get_full_path ( Basic element ) { - if ( element.name == null ) - return ""; - - GLib.StringBuilder str = new GLib.StringBuilder ( "" ); - - for ( var pos = element; pos != null ; pos = pos.parent ) { - if ( pos is Package ) - break; - - str.prepend_unichar ( '/' ); - - if ( pos.name == null ) - str.prepend ( "0" ); - else - str.prepend ( pos.name ); - } - - string package_name = element.file.name + "/"; - - str.prepend ( package_name ); - str.append_unichar ( '/' ); - return str.str; - } -*/ - public Valadoc.Settings settings { - construct set; - protected get; - } - - public override void initialisation ( Settings settings, Tree tree ) { - this.settings = settings; - - DirUtils.create ( this.settings.path, 0777 ); - this.langlet = new Valadoc.LangletIndex ( settings ); - - Gee.ReadOnlyCollection packages = tree.get_package_list (); - foreach ( Package pkg in packages ) { - pkg.visit ( this ); - } - } - - protected override string get_img_real_path ( DocumentedElement element ) { - if ( element is Package ) { - return this.current_path + element.name + ".png"; - } - - return this.current_path + "tree.png"; - } - - protected override string get_img_path ( DocumentedElement element ) { - if ( element is Package ) { - return element.name + ".png"; - } - - return "tree.png"; - } - - public override void visit_package ( Package file ) { - this.package_name = file.name; - - this.is_vapi = file.is_package; - if ( this.is_vapi ) - this.files.add ( file ); - else - source_package = file; - - this.current_path = this.settings.path + this.package_name + "/"; - - DirUtils.create ( this.current_path, 0777 ); - GLib.FileStream sfile = GLib.FileStream.open ( this.current_path + "index.html", "w" ); - this.write_file_header ( sfile, this.get_css_link ( ), file.name ); - this.write_navi_file ( sfile, file, file ); - this.write_file_content ( sfile, file, file ); - this.write_file_footer ( sfile ); - sfile = null; - - - file.visit_namespaces ( this ); - this.current_path = null; - } - -/* - private bool is_depency ( string dep ) { - foreach ( string file in this.settings.files ) { - if ( dep == file ) - return false; - } - return true; - } -*/ - private Gee.ArrayList files = new Gee.ArrayList (); - private Package source_package; - - public override void cleanups () { - this.directory_level = 0; - copy_directory ( Config.doclet_path + "deps/", this.settings.path ); - - - if ( this.source_package != null ) { - GLib.FileStream sfile = GLib.FileStream.open ( this.settings.path + "index.html", "w" ); - this.write_file_header ( sfile, this.get_css_link ( ), source_package.name ); - this.write_navi_file ( sfile, source_package, null ); - this.write_file_content ( sfile, source_package, null ); - this.write_file_footer ( sfile ); - sfile = null; - } - - GLib.FileStream sfile = GLib.FileStream.open ( this.settings.path + "packages.html", "w" ); - string title = ( this.settings.pkg_name == null )? "" : this.settings.pkg_name; - this.write_file_header ( sfile, this.get_css_link ( ), title ); - - sfile.printf ( "

Packages:

\n", css_title ); - sfile.printf ( "
    \n", css_inline_navigation ); - - foreach ( Package file in this.files ) { - if ( this.settings.with_deps ) - sfile.printf ( "\t
  • %s
  • \n", css_inline_navigation_package, css_navi_link, file.name, file.name ); - else - sfile.printf ( "\t
  • %s
  • \n", css_inline_navigation_package, file.name ); - } - - sfile.puts ( "
\n" ); - this.write_file_footer ( sfile ); - } - - public override void visit_property ( Property prop ) { - string path = this.current_path + prop.name + "/"; - DirUtils.create ( path, 0777 ); - this.directory_level++; - - GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w"); - this.write_file_header ( file, this.get_css_link ( ), prop.name ); - this.write_navi_property ( file, prop ); - this.write_property_content ( file, prop ); - this.write_file_footer ( file ); - - this.directory_level--; - file = null; - } - - public override void visit_constant ( Constant constant, ConstantHandler parent ) { - string path = this.current_path + constant.name + "/"; - - DirUtils.create ( path, 0777 ); - this.directory_level++; - GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w"); - this.write_file_header ( file, this.get_css_link ( ), constant.name ); - this.write_navi_constant ( file, constant ); - this.write_constant_content ( file, constant, parent ); - this.write_file_footer ( file ); - this.directory_level--; - file = null; - } - - public override void visit_field ( Field field, FieldHandler parent ) { - string path = this.current_path + field.name + "/"; - DirUtils.create ( path, 0777 ); - this.directory_level++; - GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w"); - this.write_file_header ( file, this.get_css_link ( ), field.name ); - this.write_navi_field ( file, field ); - this.write_field_content ( file, field, parent ); - this.write_file_footer ( file ); - this.directory_level--; - file = null; - } - - public override void visit_delegate ( Delegate del ) { - string path = this.current_path + del.name + "/"; - DirUtils.create ( path, 0777 ); - - this.directory_level++; - GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w"); - this.write_file_header ( file, this.get_css_link ( ), del.name ); - this.write_navi_delegate ( file, del ); - this.write_delegate_content ( file, del ); - this.write_file_footer ( file ); - this.directory_level--; - file = null; - } - - public override void visit_signal ( Signal sig ) { - string path = this.current_path + sig.name + "/"; - this.directory_level++; - - DirUtils.create ( path, 0777 ); - - GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w"); - this.write_file_header ( file, this.get_css_link ( ), sig.name ); - this.write_navi_signal ( file, sig ); - write_signal_content ( file, sig ); - this.write_file_footer ( file ); - - this.directory_level--; - file = null; - } - - public override void visit_method ( Method m, Valadoc.MethodHandler parent ) { - string path = this.current_path + m.name + "/"; - DirUtils.create ( path, 0777 ); - - this.directory_level++; - GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w"); - this.write_file_header ( file, this.get_css_link ( ), m.name ); - this.write_navi_method ( file, m ); - this.write_method_content ( file, m, parent ); - this.write_file_footer ( file ); - - this.directory_level--; - file = null; - } - - public override void visit_namespace ( Namespace ns ) { - string old_path = this.current_path; - this.directory_level++; - - if ( ns.name == null ) { - string tmp = this.current_path + "0/"; - this.current_path = tmp; - } - else { - string tmp = this.current_path + ns.name + "/"; - this.current_path = tmp; - } - - DirUtils.create ( this.current_path, 0777 ); - GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w" ); - this.write_file_header ( file, this.get_css_link ( ), ns.name ); - this.write_navi_namespace ( file, ns ); - this.write_namespace_content ( file, ns, ns ); - this.write_file_footer ( file ); - file = null; - - // file: - ns.visit_namespaces ( this ); - ns.visit_classes ( this ); - ns.visit_interfaces ( this ); - ns.visit_structs ( this ); - ns.visit_enums ( this ); - ns.visit_error_domains ( this ); - ns.visit_delegates ( this ); - ns.visit_methods ( this ); - ns.visit_fields ( this ); - ns.visit_constants ( this ); - - this.current_path = old_path; - this.directory_level--; - } - - public override void visit_enum ( Enum en ) { - string old_path = this.current_path; - this.directory_level++; - - this.current_path += en.name + "/"; - DirUtils.create ( this.current_path, 0777 ); - - en.visit_enum_values ( this ); - en.visit_methods ( this ); - - GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w"); - this.write_file_header ( file, this.get_css_link ( ), en.name ); - this.write_navi_enum ( file, en, en ); - this.write_enum_content ( file, en, en ); - this.write_file_footer ( file ); - file = null; - - this.current_path = old_path; - this.directory_level--; - } - - public override void visit_error_domain ( ErrorDomain errdom ) { - string old_path = this.current_path; - this.directory_level++; - - this.current_path += errdom.name + "/"; - DirUtils.create ( this.current_path, 0777 ); - - errdom.visit_methods ( this ); - - GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w"); - this.write_file_header ( file, this.get_css_link ( ), errdom.name ); - this.write_navi_error_domain ( file, errdom, errdom ); - this.write_error_domain_content ( file, errdom, errdom ); - this.write_file_footer ( file ); - file = null; - - this.current_path = old_path; - this.directory_level--; - } - - public override void visit_struct ( Struct stru ) { - string old_path = this.current_path; - this.directory_level++; - - this.current_path += stru.name + "/"; - DirUtils.create ( this.current_path, 0777 ); - - stru.visit_construction_methods ( this ); - stru.visit_methods ( this ); - stru.visit_fields ( this ); - stru.visit_constants ( this ); - - GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w"); - this.write_file_header ( file, this.get_css_link ( ), stru.name ); - this.write_navi_struct ( file, stru, stru ); - this.write_struct_content ( file, stru, stru ); - this.write_file_footer ( file ); - file = null; - - this.current_path = old_path; - this.directory_level--; - } - - public override void visit_class ( Class cl ) { - string old_path = this.current_path; - this.directory_level++; - - this.current_path += cl.name + "/"; - DirUtils.create ( this.current_path, 0777 ); - - cl.visit_construction_methods ( this ); - cl.visit_classes ( this ); - cl.visit_structs ( this ); - cl.visit_enums ( this ); - cl.visit_delegates ( this ); - cl.visit_methods ( this ); - cl.visit_signals ( this ); - cl.visit_properties ( this ); - cl.visit_fields ( this ); - cl.visit_constants ( this ); - - GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w"); - this.write_file_header ( file, this.get_css_link ( ), cl.name ); - this.write_navi_class ( file, cl, cl ); - this.write_class_content ( file, cl, cl ); - this.write_file_footer ( file ); - file = null; - - this.current_path = old_path; - this.directory_level--; - } - - public override void visit_interface ( Interface iface ) { - string old_path = this.current_path; - this.directory_level++; - - this.current_path += iface.name + "/"; - DirUtils.create ( this.current_path, 0777 ); - - iface.visit_classes ( this ); - iface.visit_structs ( this ); - iface.visit_delegates ( this ); - iface.visit_methods ( this ); - iface.visit_signals ( this ); - iface.visit_properties ( this ); - iface.visit_fields ( this ); - - GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w" ); - this.write_file_header ( file, this.get_css_link ( ), iface.name ); - this.write_navi_interface ( file, iface, iface ); - this.write_interface_content ( file, iface, iface ); - this.write_file_footer ( file ); - file = null; - - this.current_path = old_path; - this.directory_level--; - } - - public override void visit_error_code ( ErrorCode errcode ) { - } - - public override void visit_enum_value ( EnumValue enval ) { - } -} - - - - - -[ModuleInit] -public Type register_plugin ( ) { - return typeof ( Valadoc.HtmlDoclet ); -} - diff --git a/src/doclets/html/linkhelper/Makefile.am b/src/doclets/html/linkhelper/Makefile.am deleted file mode 100644 index 4f93b19d1..000000000 --- a/src/doclets/html/linkhelper/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -# src/Makefile.am - - - -libhtmlhelper_VALASOURCES = \ - helper.vala \ - $(NULL) - - -BUILT_SOURCES = libhtmlhelper.vala.stamp - - -libhtmlhelper.vala.stamp: $(libhtmlhelper_VALASOURCES) - $(VALAC) -C --library libhtmlhelper-1.0 --basedir . --vapidir ../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../vapi --pkg valadoc-1.0 $^ - touch $@ - - - -htmlhelperdir = $(libdir)/valadoc/plugins/template/ -htmlhelper_LTLIBRARIES = libhtmlhelper.la - - -libhtmlhelper_la_SOURCES = \ - libhtmlhelper.vala.stamp \ - $(libhtmlhelper_VALASOURCES:.vala=.c) \ - $(libhtmlhelper_VALASOURCES:.vala=.h) \ - $(NULL) - - -AM_CFLAGS = \ - -I ../../../libvaladoc/ \ - -I ../../htmlhelpers/ \ - $(LIBVALA_CFLAGS) \ - $(GLIB_CFLAGS) \ - $(NULL) - - -libhtmlhelper_la_LIBADD = \ - ../../../libvaladoc/libvaladoc.la \ - ../../htmlhelpers/libhtmlhelpers.la \ - $(LIBVALA_LIBS) \ - $(GLIB_LIBS) \ - $(NULL) - - -EXTRA_DIST = $(libhtmlhelper_VALASOURCES) libhtmlhelper.vala.stamp diff --git a/src/doclets/html/linkhelper/helper.vala b/src/doclets/html/linkhelper/helper.vala deleted file mode 100755 index 9b0e665aa..000000000 --- a/src/doclets/html/linkhelper/helper.vala +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Valadoc - a documentation tool for vala. - * Copyright (C) 2008 Florian Brosch - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -using GLib; - - - - -public interface Valadoc.LinkHelper { - protected string get_html_top_link ( DocumentedElement? postag ) { - GLib.StringBuilder str = new GLib.StringBuilder ( "" ); - Valadoc.Basic pos = postag; - - while ( pos != null ) { - str.append ( "../" ); - pos = pos.parent; - } - return str.str; - } - - protected string? get_html_link ( Valadoc.Settings settings, DocumentedElement element, DocumentedElement? pos2 ) { - Package pkg = ( element is Package )? (Package)element : element.package; - if ( pkg.is_visitor_accessible () == false ) - return null; - - GLib.StringBuilder str = new GLib.StringBuilder ( "" ); - DocumentedElement pos = element; - string? link_id = null; - - if ( element is Valadoc.Package == false ) { - if ( element is Valadoc.EnumValue || element is Valadoc.ErrorCode ) { - link_id = "#" + element.name; - pos = (DocumentedElement)pos.parent; - } - else if ( element is Visitable ) { - if ( !((Visitable)element).is_visitor_accessible() ) - return null; - } - - while ( pos is Package == false ) { - string name = pos.name; - if ( name == null ) - str.prepend ( "0" ); - else - str.prepend ( name ); - - str.prepend ( "/" ); - pos = (DocumentedElement)pos.parent; - } - } - - str.prepend ( pos.package.name ); - str.prepend ( this.get_html_top_link ( pos2 ) ); - str.append ( "/index.html" ); - - if ( link_id != null ) - str.append ( link_id ); - - return str.str; - } -} - diff --git a/src/doclets/html/taglets/return/Makefile.am b/src/doclets/html/taglets/return/Makefile.am deleted file mode 100644 index c9b96f3bd..000000000 --- a/src/doclets/html/taglets/return/Makefile.am +++ /dev/null @@ -1,57 +0,0 @@ -# src/Makefile.am - - - -libtagletXXXX_VALASOURCES = \ - taglet.vala \ - $(NULL) - - -BUILT_SOURCES = libtagletXXXX.vala.stamp - - -libtagletXXXX.vala.stamp: $(libtagletXXXX_VALASOURCES) - $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ - touch $@ - - - - -tagletXXXXdir = $(libdir)/valadoc/plugins/template/taglets/ - -tagletXXXX_LTLIBRARIES = libtagletXXXX.la - - -libtagletXXXX_la_SOURCES = \ - libtagletXXXX.vala.stamp \ - $(libtagletXXXX_VALASOURCES:.vala=.c) \ - $(libtagletXXXX_VALASOURCES:.vala=.h) \ - $(NULL) - - - -AM_CFLAGS = -g \ - -I ../../../../libvaladoc/ \ - -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ - -I ../../ \ - $(GLIB_CFLAGS) \ - $(LIBVALA_CFLAGS) \ - $(NULL) - - -libtagletXXXX_la_LDFLAGS = -module -avoid-version - - -libtagletXXXX_la_LIBADD = \ - ../../../../libvaladoc/libvaladoc.la \ - ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ - $(GLIB_LIBS) \ - $(LIBVALA_LIBS) \ - $(NULL) - - - - -EXTRA_DIST = $(libtagletXXXX_VALASOURCES) libtagletXXXX.vala.stamp diff --git a/src/doclets/html/taglets/throws/Makefile.am b/src/doclets/html/taglets/throws/Makefile.am deleted file mode 100644 index 247d42099..000000000 --- a/src/doclets/html/taglets/throws/Makefile.am +++ /dev/null @@ -1,57 +0,0 @@ -# src/Makefile.am - - - -libexceptionparameter_VALASOURCES = \ - taglet.vala \ - $(NULL) - - -BUILT_SOURCES = libexceptionparameter.vala.stamp - - -libexceptionparameter.vala.stamp: $(libexceptionparameter_VALASOURCES) - $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^ - touch $@ - - - - -exceptionparameterdir = $(libdir)/valadoc/plugins/template/taglets/ - -exceptionparameter_LTLIBRARIES = libexceptionparameter.la - - -libexceptionparameter_la_SOURCES = \ - libexceptionparameter.vala.stamp \ - $(libexceptionparameter_VALASOURCES:.vala=.c) \ - $(libexceptionparameter_VALASOURCES:.vala=.h) \ - $(NULL) - - - -AM_CFLAGS = -g \ - -I ../../../../libvaladoc/ \ - -I ../../../htmlhelpers/ \ - -I ../../linkhelper/ \ - -I ../../ \ - $(GLIB_CFLAGS) \ - $(LIBVALA_CFLAGS) \ - $(NULL) - - -libexceptionparameter_la_LDFLAGS = -module -avoid-version - - -libexceptionparameter_la_LIBADD = \ - ../../../../libvaladoc/libvaladoc.la \ - ../../../htmlhelpers/libhtmlhelpers.la \ - ../../linkhelper/libhtmlhelper.la \ - $(GLIB_LIBS) \ - $(LIBVALA_LIBS) \ - $(NULL) - - - - -EXTRA_DIST = $(libexceptionparameter_VALASOURCES) libexceptionparameter.vala.stamp diff --git a/src/doclets/htmlhelpers/Makefile.am b/src/doclets/htmlhelpers/Makefile.am index 63cad2252..0d8ad8564 100644 --- a/src/doclets/htmlhelpers/Makefile.am +++ b/src/doclets/htmlhelpers/Makefile.am @@ -29,6 +29,7 @@ libhtmlhelpers_la_SOURCES = \ AM_CFLAGS = \ -I ../../libvaladoc/ \ + $(LIBGVC_CFLAGS) \ $(LIBVALA_CFLAGS) \ $(GLIB_CFLAGS) \ $(NULL) @@ -36,6 +37,7 @@ AM_CFLAGS = \ libhtmlhelper_la_LIBADD = \ ../../libvaladoc/libvaladoc.la \ + $(LIBGVC_LIBS) \ $(LIBVALA_LIBS) \ $(GLIB_LIBS) \ $(NULL) diff --git a/src/doclets/htmlhelpers/htmlhelpers.vala b/src/doclets/htmlhelpers/htmlhelpers.vala index 4145c6d91..42f1f97cc 100644 --- a/src/doclets/htmlhelpers/htmlhelpers.vala +++ b/src/doclets/htmlhelpers/htmlhelpers.vala @@ -5,272 +5,279 @@ using GLib; namespace Valadoc { + public const string css_inline_navigation = "main_inline_navigation"; + public const string css_inline_navigation_errorcode = "main_inline_navigation_errorcode"; + public const string css_inline_navigation_enumvalue = "main_inline_navigation_enumvalue"; + public const string css_inline_navigation_property = "main_inline_navigation_property"; + public const string css_inline_navigation_virtual_property = "main_inline_navigation_virtual_property"; + public const string css_inline_navigation_abstract_property = "main_inline_navigation_abstract_property"; + public const string css_inline_navigation_method = "main_inline_navigation_method"; + public const string css_inline_navigation_static_method = "main_inline_navigation_static_method"; + public const string css_inline_navigation_virtual_method = "main_inline_navigation_virtual_method"; + public const string css_inline_navigation_abstract_method = "main_inline_navigation_abstract_method"; + public const string css_inline_navigation_construction_method = "main_inline_navigation_construction_method"; + public const string css_inline_navigation_brief_description = "main_inline_navigation_brief_description"; + public const string css_inline_navigation_signal = "main_inline_navigation_signal"; + public const string css_inline_navigation_fields = "main_inline_navigation_fields"; + public const string css_inline_navigation_abstract_class = "main_inline_navigation_abstract_class"; + public const string css_inline_navigation_class = "main_inline_navigation_class"; + public const string css_inline_navigation_enum = "main_inline_navigation_enum"; + public const string css_inline_navigation_struct = "main_inline_navigation_struct"; + public const string css_inline_navigation_delegate = "main_inline_navigation_delegate"; + public const string css_inline_navigation_constant = "main_inline_navigation_constant"; + public const string css_inline_navigation_namespace = "main_inline_navigation_namespace"; + public const string css_inline_navigation_package = "main_inline_navigation_package"; + public const string css_inline_navigation_interface = "main_navigation_interface"; + public const string css_inline_navigation_errordomain = "main_inline_navigation_errordomain"; + public const string css_site_header = "site_header"; + public const string css_navi_package_index = "navi_package_index"; + public const string css_navi_package = "navi_package"; + public const string css_navi_creation_method = "navi_creation_method"; + public const string css_navi_error_domain = "navi_error_domain"; + public const string css_navi_namespace = "navi_namespace"; + public const string css_navi_abstract_method = "navi_abstract_method"; + public const string css_navi_virtual_method = "navi_virtual_method"; + public const string css_navi_static_method = "navi_static_method"; + public const string css_navi_construction_method = "navi_construction_method"; + public const string css_navi_method = "navi_method"; + public const string css_navi_struct = "navi_struct"; + public const string css_navi_iface = "navi_iface"; + public const string css_navi_field = "navi_field"; + public const string css_navi_class = "navi_class"; + public const string css_navi_abstract_class = "navi_abstract_class"; + public const string css_navi_enum = "navi_enum"; + public const string css_navi_link = "navi_link"; + public const string css_navi_constant = "navi_constant"; + public const string css_navi_prop = "navi_prop"; + public const string css_navi_abstract_prop = "navi_abstract_prop"; + public const string css_navi_virtual_prop = "navi_virtual_prop"; + public const string css_navi_del = "navi_del"; + public const string css_navi_sig = "navi_sig"; + public const string css_navi = "navi_main"; + public const string css_navi_enval = "main_navi_enval"; + public const string css_navi_errdomcode = "main_navi_errdomcode"; + public const string css_navi_hr = "navi_hr"; + public const string css_errordomain_table_name = "main_errordomain_table_name"; + public const string css_errordomain_table_text = "main_errordomain_table_text"; + public const string css_errordomain_table = "main_errordomain_table"; + public const string css_enum_table_name = "main_enum_table_name"; + public const string css_enum_table_text = "main_enum_table_text"; + public const string css_enum_table = "main_enum_table"; + public const string css_diagram = "main_diagram"; + public const string css_see_list = "main_see_list"; + public const string css_wiki_table = "main_table"; + public const string css_notification_area = "main_notification"; + public const string css_source_sample = "main_sourcesample"; + public const string css_exception_table = "main_parameter_table"; + public const string css_parameter_table_text = "main_parameter_table_text"; + public const string css_parameter_table_name = "main_parameter_table_name"; + public const string css_parameter_table = "main_parameter_table"; + public const string css_title = "main_title"; + public const string css_other_type = "main_other_type"; + public const string css_basic_type = "main_basic_type"; + public const string css_keyword = "main_keyword"; + public const string css_optional_parameter = "main_optional_parameter"; + public const string css_code_definition = "main_code_definition"; + public const string css_headline_hr = "main_hr"; + public const string css_hr = "main_hr"; + public const string css_list_errdom = "main_list_errdom"; + public const string css_list_en = "main_list_en"; + public const string css_list_ns = "main_list_ns"; + public const string css_list_cl = "main_list_cl"; + public const string css_list_iface = "main_list_iface"; + public const string css_list_stru = "main_list_stru"; + public const string css_list_field = "main_list_field"; + public const string css_list_prop = "main_list_prop"; + public const string css_list_del = "main_list_del"; + public const string css_list_sig = "main_list_sig"; + public const string css_list_m = "main_list_m"; + public const string css_style_navigation = "site_navigation"; + public const string css_style_content = "site_content"; + public const string css_style_body = "site_body"; + public const string css_content_link_constant = "css_content_link_constant"; + public const string css_content_link_namespace = "css_content_link_namespace"; + public const string css_content_link_struct = "css_content_link_struct"; + public const string css_content_link_interface = "css_content_link_interface"; + public const string css_content_link_enum = "css_content_link_enum"; + public const string css_content_link_errordomain = "css_content_link_errordomain"; + public const string css_content_link_delegate = "css_content_link_delegate"; + public const string css_content_link_signal = "css_content_link_signal"; + public const string css_content_link_field = "css_content_link_field"; + public const string css_content_link_enumvalue = "css_content_link_enumvalue"; + public const string css_content_link_errorcode = "css_content_link_errorcode"; + public const string css_content_link_class = "css_content_link_class"; + public const string css_content_link_abstract_class = "css_content_link_abstract_class"; + public const string css_content_link_property = "css_content_link_property"; + public const string css_content_link_virtual_property = "css_content_link_virtual_property"; + public const string css_content_link_abstract_property = "css_content_link_abstract_property"; + public const string css_content_link_method = "css_content_link_method"; + public const string css_content_link_static_method = "css_content_link_static_method"; + public const string css_content_link_virtual_method = "css_content_link_virtual_method"; + public const string css_content_link_abstract_method = "css_content_link_abstract_method"; + public const string css_content_link_construction_method = "css_content_link_construction_method"; + + + public string? get_html_link ( Settings settings, DocumentedElement element, DocumentedElement? pos ) { + if ( element is Package ) { + return ( ((Package)element).is_visitor_accessible() == true )? ((pos == null)? "" : "../") + element.name + "/index.htm" : null; + } + + if ( element is Visitable ) { + if ( ((Visitable)element).is_visitor_accessible () == false ) + return null; + + if ( element.package.is_visitor_accessible () == false ) + return null; + } + + string prefix = ""; + string tmp = ""; + + if ( element != pos ) { + prefix = "../" + element.package.name; + } -public const string css_inline_navigation = "main_inline_navigation"; - -public const string css_inline_navigation_errorcode = "main_inline_navigation_errorcode"; -public const string css_inline_navigation_enumvalue = "main_inline_navigation_enumvalue"; - -public const string css_inline_navigation_property = "main_inline_navigation_property"; -public const string css_inline_navigation_virtual_property = "main_inline_navigation_virtual_property"; -public const string css_inline_navigation_abstract_property = "main_inline_navigation_abstract_property"; - -public const string css_inline_navigation_method = "main_inline_navigation_method"; -public const string css_inline_navigation_static_method = "main_inline_navigation_static_method"; -public const string css_inline_navigation_virtual_method = "main_inline_navigation_virtual_method"; -public const string css_inline_navigation_abstract_method = "main_inline_navigation_abstract_method"; -public const string css_inline_navigation_construction_method = "main_inline_navigation_construction_method"; - - - -public const string css_inline_navigation_brief_description = "main_inline_navigation_brief_description"; - -public const string css_inline_navigation_signal = "main_inline_navigation_signal"; -public const string css_inline_navigation_fields = "main_inline_navigation_fields"; -public const string css_inline_navigation_abstract_class = "main_inline_navigation_abstract_class"; -public const string css_inline_navigation_class = "main_inline_navigation_class"; -public const string css_inline_navigation_enum = "main_inline_navigation_enum"; -public const string css_inline_navigation_struct = "main_inline_navigation_struct"; -public const string css_inline_navigation_delegate = "main_inline_navigation_delegate"; -public const string css_inline_navigation_constant = "main_inline_navigation_constant"; -public const string css_inline_navigation_namespace = "main_inline_navigation_namespace"; -public const string css_inline_navigation_package = "main_inline_navigation_package"; -public const string css_inline_navigation_interface = "main_navigation_interface"; -public const string css_inline_navigation_errordomain = "main_inline_navigation_errordomain"; - -public const string css_site_header = "site_header"; - -public const string css_navi_package_index = "navi_package_index"; -public const string css_navi_package = "navi_package"; - -public const string css_navi_creation_method = "navi_creation_method"; - -public const string css_navi_error_domain = "navi_error_domain"; -public const string css_navi_namespace = "navi_namespace"; -public const string css_navi_abstract_method = "navi_abstract_method"; -public const string css_navi_virtual_method = "navi_virtual_method"; -public const string css_navi_static_method = "navi_static_method"; -public const string css_navi_construction_method = "navi_construction_method"; -public const string css_navi_method = "navi_method"; -public const string css_navi_struct = "navi_struct"; -public const string css_navi_iface = "navi_iface"; -public const string css_navi_field = "navi_field"; -public const string css_navi_class = "navi_class"; -public const string css_navi_abstract_class = "navi_abstract_class"; -public const string css_navi_enum = "navi_enum"; -public const string css_navi_link = "navi_link"; -public const string css_navi_constant = "navi_constant"; -public const string css_navi_prop = "navi_prop"; -public const string css_navi_abstract_prop = "navi_abstract_prop"; -public const string css_navi_virtual_prop = "navi_virtual_prop"; -public const string css_navi_del = "navi_del"; -public const string css_navi_sig = "navi_sig"; -public const string css_navi = "navi_main"; -public const string css_navi_enval = "main_navi_enval"; -public const string css_navi_errdomcode = "main_navi_errdomcode"; -public const string css_navi_hr = "navi_hr"; - -public const string css_errordomain_table_name = "main_errordomain_table_name"; -public const string css_errordomain_table_text = "main_errordomain_table_text"; -public const string css_errordomain_table = "main_errordomain_table"; - - -public const string css_enum_table_name = "main_enum_table_name"; -public const string css_enum_table_text = "main_enum_table_text"; -public const string css_enum_table = "main_enum_table"; - -public const string css_diagram = "main_diagram"; -public const string css_see_list = "main_see_list"; -public const string css_exception_table = "main_parameter_table"; -public const string css_parameter_table_text = "main_parameter_table_text"; -public const string css_parameter_table_name = "main_parameter_table_name"; -public const string css_parameter_table = "main_parameter_table"; -public const string css_title = "main_title"; -public const string css_other_type = "main_other_type"; -public const string css_basic_type = "main_basic_type"; -public const string css_keyword = "main_keyword"; -public const string css_optional_parameter = "main_optional_parameter"; -public const string css_code_definition = "main_code_definition"; -public const string css_headline_hr = "main_hr"; -public const string css_hr = "main_hr"; -public const string css_list_errdom = "main_list_errdom"; -public const string css_list_en = "main_list_en"; -public const string css_list_ns = "main_list_ns"; -public const string css_list_cl = "main_list_cl"; -public const string css_list_iface = "main_list_iface"; -public const string css_list_stru = "main_list_stru"; -public const string css_list_field = "main_list_field"; -public const string css_list_prop = "main_list_prop"; -public const string css_list_del = "main_list_del"; -public const string css_list_sig = "main_list_sig"; -public const string css_list_m = "main_list_m"; - -public const string css_style_navigation = "site_navigation"; -public const string css_style_content = "site_content"; -public const string css_style_body = "site_body"; - - - - - -public const string css_content_link_constant = "css_content_link_constant"; -public const string css_content_link_namespace = "css_content_link_namespace"; -public const string css_content_link_struct = "css_content_link_struct"; -public const string css_content_link_interface = "css_content_link_interface"; -public const string css_content_link_enum = "css_content_link_enum"; -public const string css_content_link_errordomain = "css_content_link_errordomain"; -public const string css_content_link_delegate = "css_content_link_delegate"; -public const string css_content_link_signal = "css_content_link_signal"; -public const string css_content_link_field = "css_content_link_field"; -public const string css_content_link_enumvalue = "css_content_link_enumvalue"; -public const string css_content_link_errorcode = "css_content_link_errorcode"; - -public const string css_content_link_class = "css_content_link_class"; -public const string css_content_link_abstract_class = "css_content_link_abstract_class"; - -public const string css_content_link_property = "css_content_link_property"; -public const string css_content_link_virtual_property = "css_content_link_virtual_property"; -public const string css_content_link_abstract_property = "css_content_link_abstract_property"; - -public const string css_content_link_method = "css_content_link_method"; -public const string css_content_link_static_method = "css_content_link_static_method"; -public const string css_content_link_virtual_method = "css_content_link_virtual_method"; -public const string css_content_link_abstract_method = "css_content_link_abstract_method"; -public const string css_content_link_construction_method = "css_content_link_construction_method"; - - -public string get_html_content_link_css_class ( Valadoc.Basic element ) { - if ( element is Namespace ) { - return css_content_link_namespace; - } - else if ( element is Struct ) { - return css_content_link_struct; - } - else if ( element is Interface ) { - return css_content_link_interface; - } - else if ( element is Class ) { - if ( ((Class)element).is_abstract ) - return css_content_link_abstract_class; - else - return css_content_link_class; - } - else if ( element is Enum ) { - return css_content_link_enum; - } - else if ( element is ErrorDomain ) { - return css_content_link_errordomain; - } - else if ( element is Delegate ) { - return css_content_link_delegate; - } - else if ( element is Method ) { - if ( ((Method)element).is_constructor ) - return css_content_link_construction_method; - else if ( ((Method)element).is_abstract ) - return css_content_link_abstract_method; - else if ( ((Method)element).is_override || ((Method)element).is_override ) - return css_content_link_virtual_method; - else if ( ((Method)element).is_static ) - return css_content_link_static_method; - else - return css_content_link_method; - } - else if ( element is Signal ) { - return css_content_link_signal; - } - else if ( element is Property ) { - if ( ((Property)element).is_virtual || ((Property)element).is_override ) - return css_content_link_virtual_property; - else if ( ((Property)element).is_abstract ) - return css_content_link_abstract_property; - else - return css_content_link_property; - } - else if ( element is Field ) { - return css_content_link_field; - } - else if ( element is Constant ) { - return css_content_link_constant; - } - else if ( element is EnumValue ) { - return css_content_link_enumvalue; - } - else if ( element is ErrorCode ) { - return css_content_link_errorcode; - } - return ""; -} - - - + if ( element is Valadoc.EnumValue || element is Valadoc.ErrorCode ) { + tmp = "#" + element.name; + element = (DocumentedElement)element.parent; + } -public string get_html_inline_navigation_link_css_class ( Valadoc.Basic element ) { - if ( element is Namespace ) { - } - else if ( element is Struct ) { - return css_inline_navigation_struct; - } - else if ( element is Interface ) { - return css_inline_navigation_interface; - } - else if ( element is Class ) { - return (((Class)element).is_abstract)? css_inline_navigation_abstract_class : css_inline_navigation_class; - } - else if ( element is Enum ) { - return css_inline_navigation_enum; - } - else if ( element is ErrorDomain ) { - return css_inline_navigation_errordomain; - } - else if ( element is Delegate ) { - return css_inline_navigation_delegate; - } - else if ( element is Method ) { - if ( ((Method)element).is_static ) - return css_inline_navigation_static_method; - else if ( ((Method)element).is_static ) - return css_inline_navigation_static_method; - else if ( ((Method)element).is_constructor ) - return css_inline_navigation_construction_method; - else if ( ((Method)element).is_abstract ) - return css_inline_navigation_abstract_method; - else if ( ((Method)element).is_virtual || ((Method)element).is_override ) - return css_inline_navigation_virtual_method; - else - return css_inline_navigation_method; - } - else if ( element is Signal ) { - return css_inline_navigation_signal; - } - else if ( element is Property ) { - if ( ((Property)element).is_virtual || ((Property)element).is_override ) - return css_inline_navigation_virtual_property; - else if ( ((Property)element).is_abstract ) - return css_inline_navigation_abstract_property; - else - return css_inline_navigation_property; - } - else if ( element is Field ) { - return css_inline_navigation_fields; + return prefix + "/" + element.full_name () + ".html" + tmp; } - else if ( element is Constant ) { - return css_inline_navigation_constant; - } - else if ( element is EnumValue ) { - return css_inline_navigation_enumvalue; + + public string get_html_content_link_css_class ( Valadoc.Basic element ) { + if ( element is Namespace ) { + return css_content_link_namespace; + } + else if ( element is Struct ) { + return css_content_link_struct; + } + else if ( element is Interface ) { + return css_content_link_interface; + } + else if ( element is Class ) { + if ( ((Class)element).is_abstract ) + return css_content_link_abstract_class; + else + return css_content_link_class; + } + else if ( element is Enum ) { + return css_content_link_enum; + } + else if ( element is ErrorDomain ) { + return css_content_link_errordomain; + } + else if ( element is Delegate ) { + return css_content_link_delegate; + } + else if ( element is Method ) { + if ( ((Method)element).is_constructor ) + return css_content_link_construction_method; + else if ( ((Method)element).is_abstract ) + return css_content_link_abstract_method; + else if ( ((Method)element).is_override || ((Method)element).is_override ) + return css_content_link_virtual_method; + else if ( ((Method)element).is_static ) + return css_content_link_static_method; + else + return css_content_link_method; + } + else if ( element is Signal ) { + return css_content_link_signal; + } + else if ( element is Property ) { + if ( ((Property)element).is_virtual || ((Property)element).is_override ) + return css_content_link_virtual_property; + else if ( ((Property)element).is_abstract ) + return css_content_link_abstract_property; + else + return css_content_link_property; + } + else if ( element is Field ) { + return css_content_link_field; + } + else if ( element is Constant ) { + return css_content_link_constant; + } + else if ( element is EnumValue ) { + return css_content_link_enumvalue; + } + else if ( element is ErrorCode ) { + return css_content_link_errorcode; + } + return ""; } - else if ( element is ErrorCode ) { - return css_inline_navigation_errorcode; + + public string get_html_inline_navigation_link_css_class ( Valadoc.Basic element ) { + if ( element is Namespace ) { + return css_inline_navigation_namespace; + } + else if ( element is Struct ) { + return css_inline_navigation_struct; + } + else if ( element is Interface ) { + return css_inline_navigation_interface; + } + else if ( element is Class ) { + return (((Class)element).is_abstract)? css_inline_navigation_abstract_class : css_inline_navigation_class; + } + else if ( element is Enum ) { + return css_inline_navigation_enum; + } + else if ( element is ErrorDomain ) { + return css_inline_navigation_errordomain; + } + else if ( element is Delegate ) { + return css_inline_navigation_delegate; + } + else if ( element is Method ) { + if ( ((Method)element).is_static ) + return css_inline_navigation_static_method; + else if ( ((Method)element).is_static ) + return css_inline_navigation_static_method; + else if ( ((Method)element).is_constructor ) + return css_inline_navigation_construction_method; + else if ( ((Method)element).is_abstract ) + return css_inline_navigation_abstract_method; + else if ( ((Method)element).is_virtual || ((Method)element).is_override ) + return css_inline_navigation_virtual_method; + else + return css_inline_navigation_method; + } + else if ( element is Signal ) { + return css_inline_navigation_signal; + } + else if ( element is Property ) { + if ( ((Property)element).is_virtual || ((Property)element).is_override ) + return css_inline_navigation_virtual_property; + else if ( ((Property)element).is_abstract ) + return css_inline_navigation_abstract_property; + else + return css_inline_navigation_property; + } + else if ( element is Field ) { + return css_inline_navigation_fields; + } + else if ( element is Constant ) { + return css_inline_navigation_constant; + } + else if ( element is EnumValue ) { + return css_inline_navigation_enumvalue; + } + else if ( element is ErrorCode ) { + return css_inline_navigation_errorcode; + } + else if ( element is Package ) { + return css_inline_navigation_package; + } + return ""; } - return ""; -} } -/* ---- **/ + public abstract class Valadoc.SeeHtmlHelperTaglet : MainTaglet { public override int order { get { return 400; } } private string name; @@ -717,10 +724,6 @@ public class Valadoc.StringHtmlTaglet : StringTaglet { } -/* ---- **/ - - - public abstract class Valadoc.BasicHtmlLanglet : Valadoc.Langlet { public Valadoc.Settings settings { @@ -1394,7 +1397,7 @@ public class Valadoc.TableHtmlHelperDocElement : TableDocElement { public override bool write ( void* res, int max, int index ) { weak GLib.FileStream file = (GLib.FileStream)res; - file.puts ( "\n", css_wiki_table ); foreach ( Gee.ArrayList row in this.cells ) { int _max = row.size; int _index = 0; @@ -1427,7 +1430,7 @@ public class Valadoc.NotificationHtmlHelperDocElement : NotificationDocElement { int _max = this.content.size; int _index = 0; - file.printf ( "\n
\n" ); + file.printf ( "\n
\n", css_notification_area ); foreach ( DocElement element in this.content ) { element.write ( res, _max, _index ); @@ -1451,9 +1454,9 @@ public class Valadoc.SourceCodeHtmlHelerDocElement : SourceCodeDocElement { public override bool write ( void* res, int max, int index ) { weak GLib.FileStream file = (GLib.FileStream)res; - file.puts ( "
" );
+		file.printf ( "\n
\n\t
", css_source_sample );
 		file.puts ( src );
-		file.puts ( "
" ); + file.puts ( "
\n
" ); return true; } } @@ -1575,28 +1578,43 @@ public class Valadoc.CenterHtmlHelperDocElement : CenterDocElement { public class Valadoc.ImageHtmlHelperDocElement : ImageDocElement { - protected ImageDocElementPosition position; - protected string path; + private ImageDocElementPosition position; + private static uint counter = 0; + + private string htmlpath; + private string npath; + private string path; public override bool parse ( Settings settings, Tree tree, DocumentedElement me, string# path, ImageDocElementPosition pos ) { + if ( GLib.FileUtils.test ( path, GLib.FileTest.EXISTS | GLib.FileTest.IS_REGULAR ) == false ) + return false; + + weak string? dotpos = path.rchr ( -1, '.' ); + this.htmlpath = GLib.Path.build_filename ( "img", "%u%s".printf ( this.counter++, (dotpos == null)? "" : dotpos.ndup ( dotpos.size() ) ) ); + this.npath = realpath ( GLib.Path.build_filename ( settings.path, me.package.name, this.htmlpath ) ); + this.path = realpath ( path ); + this.position = pos; - this.path = #path; return true; } public override bool write ( void* res, int max, int index ) { + bool tmp = copy_file ( this.path, this.npath ); + if ( tmp == false ) + return false; + switch ( this.position ) { case ImageDocElementPosition.NEUTRAL: - ((GLib.FileStream)res).printf ( "", this.path ); + ((GLib.FileStream)res).printf ( "", this.htmlpath ); break; case ImageDocElementPosition.MIDDLE: - ((GLib.FileStream)res).printf ( "", this.path ); + ((GLib.FileStream)res).printf ( "", this.htmlpath ); break; case ImageDocElementPosition.RIGHT: - ((GLib.FileStream)res).printf ( "", this.path ); + ((GLib.FileStream)res).printf ( "", this.htmlpath ); break; case ImageDocElementPosition.LEFT: - ((GLib.FileStream)res).printf ( "", this.path ); + ((GLib.FileStream)res).printf ( "", this.htmlpath ); break; } return true; @@ -1631,9 +1649,11 @@ public class Valadoc.ImageHtmlHelperDocElement : ImageDocElement { public abstract class Valadoc.BasicHtmlDoclet : Valadoc.Doclet { protected Valadoc.Langlet langlet; + protected Settings settings; - protected abstract string get_link ( DocumentedElement p1, DocumentedElement? p2 ); - + protected string? get_link ( DocumentedElement element, DocumentedElement? pos ) { + return get_html_link ( this.settings, element, pos ); + } // Navi: protected void write_navi_entry_html_template ( GLib.FileStream file, string style, string content ) { @@ -1707,20 +1727,11 @@ public abstract class Valadoc.BasicHtmlDoclet : Valadoc.Doclet { file.printf ( "\n
\n", css_navi, css_navi_package_index, css_navi_link, link, css_navi_hr ); } - //FIXME: Basic pos => Basic? pos - protected virtual void write_top_element ( GLib.FileStream file, DocumentedElement? pos ) { - } - protected void write_top_elements ( GLib.FileStream file, DocumentedElement element, DocumentedElement? mself ) { Gee.ArrayList lst = new Gee.ArrayList (); DocumentedElement pos = element; -// if ( mself == null ) -// mself = element; - -// string package_name = element.file.name; - - this.write_top_element ( file, mself ); + this.write_top_element_template ( file, "../index.html" ); while ( pos != null ) { lst.add ( pos ); @@ -1788,7 +1799,7 @@ public abstract class Valadoc.BasicHtmlDoclet : Valadoc.Doclet { this.write_navi_child_enums_without_childs ( file, ns, mself ); this.write_navi_child_error_domains_without_childs ( file, ns, mself ); this.write_navi_child_delegates ( file, ns, mself ); - this.write_navi_child_static_methods ( file, ns, mself ); // remove + this.write_navi_child_static_methods ( file, ns, mself ); this.write_navi_child_methods ( file, ns, mself ); this.write_navi_child_fields ( file, ns, mself ); this.write_navi_child_constants ( file, ns, mself ); @@ -1851,11 +1862,11 @@ public abstract class Valadoc.BasicHtmlDoclet : Valadoc.Doclet { file.printf ( "
    \n", css_navi ); foreach ( EnumValue env in enum_values ) { - this.write_navi_entry ( file, env, en, css_navi_enval, true ); // en => mself + this.write_navi_entry ( file, env, en, css_navi_enval, true ); } this.write_navi_child_static_methods ( file, en, mself ); - this.write_navi_child_methods ( file, en, mself ); // remove + this.write_navi_child_methods ( file, en, mself ); file.puts ( "
\n" ); } @@ -1871,11 +1882,11 @@ public abstract class Valadoc.BasicHtmlDoclet : Valadoc.Doclet { file.printf ( "
    \n", css_navi ); foreach ( ErrorCode ec in error_codes ) { - this.write_navi_entry ( file, ec, errdom, css_navi_errdomcode, true ); // errdom => mself + this.write_navi_entry ( file, ec, errdom, css_navi_errdomcode, true ); } this.write_navi_child_static_methods ( file, errdom, mself ); - this.write_navi_child_methods ( file, errdom, mself ); // remove + this.write_navi_child_methods ( file, errdom, mself ); file.puts ( "
\n" ); } @@ -2280,11 +2291,11 @@ public abstract class Valadoc.BasicHtmlDoclet : Valadoc.Doclet { int _max = brief.size; int _index = 0; - foreach ( DocElement element in brief ) { - if ( element is InlineTaglet ) - file.puts ( ((InlineTaglet)element).to_string() ); + foreach ( DocElement element2 in brief ) { + if ( element2 is InlineTaglet ) + file.puts ( ((InlineTaglet)element2).to_string() ); else - element.write ( file, _max, _index ); + element2.write ( file, _max, _index ); _index++; } @@ -2307,6 +2318,38 @@ public abstract class Valadoc.BasicHtmlDoclet : Valadoc.Doclet { doctree.write_content ( file ); } + public void write_navi_packages_inline ( GLib.FileStream file, Tree tree ) { + file.printf ( "
    \n", css_navi ); + foreach ( Package pkg in tree.get_package_list() ) { + if ( pkg.is_visitor_accessible ( ) ) { + file.printf ( "\t
  • %s\n", get_html_inline_navigation_link_css_class (pkg), css_navi_link, this.get_link(pkg, null), pkg.name ); + // brief description + file.puts ( "
  • \n" ); + } + else { + file.printf ( "\t
  • %s
  • \n", get_html_inline_navigation_link_css_class (pkg), pkg.name ); + } + } + file.puts ( "\n" ); + } + + public void write_navi_packages ( GLib.FileStream file, Tree tree ) { + file.printf ( "\t\t\t
    \n", css_style_navigation ); + this.write_navi_packages_inline ( file, tree ); + file.puts ( "\t\t\t
    \n" ); + } + + public void write_packages_content ( GLib.FileStream file, Tree tree ) { + file.printf ( "\t\t\t
    \n", css_style_content ); + file.printf ( "\t\t\t\t

    Packages:

    \n", css_title ); + file.printf ( "\t\t\t\t
    \n", css_headline_hr ); + file.printf ( "\t\t\t\t

    Description:

    \n", css_title ); + file.printf ( "\t\t\t\t

    Content:

    \n", css_title ); + file.printf ( "\t\t\t\t

    Packages:

    \n", css_title ); + this.write_navi_packages_inline ( file, tree ); + file.puts ( "\t\t\t
    \n" ); + } + public void write_method_content ( GLib.FileStream file, Method m , Valadoc.MethodHandler parent ) { string full_name = m.full_name ( ); file.printf ( "\t\t\t
    \n", css_style_content ); @@ -2540,17 +2583,6 @@ public abstract class Valadoc.BasicHtmlDoclet : Valadoc.Doclet { return ; file.printf ( "

    Dependencies:

    \n", css_title ); - - /* - string realimgpath = this.get_img_real_path ( package ); - string imgpath = this.get_img_path ( package ); - - Diagrams.write_dependency_diagram ( package, realimgpath ); - - / / image - file.printf ( "\n", css_diagram, imgpath ); - */ - file.printf ( "
      \n", css_inline_navigation ); foreach ( Package p in deps ) { string link = this.get_link(p, mself); @@ -2695,11 +2727,13 @@ public abstract class Valadoc.BasicHtmlDoclet : Valadoc.Doclet { file.puts ( "\t\t\t
    \n" ); } + protected string get_img_path ( DocumentedElement element ) { + return "img/" + element.full_name () + ".png"; + } - protected abstract string get_img_real_path ( DocumentedElement element ); - - protected abstract string get_img_path ( DocumentedElement element ); - + protected string get_img_real_path ( DocumentedElement element ) { + return this.settings.get_real_path ( ) + "/" + element.package.name + "/" + "img/" + element.full_name () + ".png"; + } protected void write_child_constants ( GLib.FileStream file, ConstantHandler ch, DocumentedElement? mself ) { Gee.ReadOnlyCollection constants = ch.get_constant_list (); @@ -2721,7 +2755,7 @@ public abstract class Valadoc.BasicHtmlDoclet : Valadoc.Doclet { file.printf ( "

    Enums:

    \n", css_title ); file.printf ( "
      \n", css_inline_navigation ); foreach ( Enum en in enums ) { - file.printf ( "\t
    • %s
    • \n", get_html_inline_navigation_link_css_class (en), css_navi_link, this.get_link(en, mself), en.name ); + file.printf ( "\t
    • %s\n", get_html_inline_navigation_link_css_class (en), css_navi_link, this.get_link(en, mself), en.name ); this.write_brief_description ( file, en, mself ); file.printf ( "
    • \n" ); } @@ -2912,7 +2946,6 @@ public abstract class Valadoc.BasicHtmlDoclet : Valadoc.Doclet { file.printf ( "\t\t\t\t

      %s:

      \n", css_title, f.name ); file.printf ( "\t\t\t\t
      \n", css_headline_hr ); file.printf ( "\t\t\t\t

      Description:

      \n", css_title ); - file.printf ( "\n\t\t\t\t

      Content:

      \n", css_title ); this.write_child_namespaces ( file, f, mself ); @@ -2937,23 +2970,21 @@ public abstract class Valadoc.BasicHtmlDoclet : Valadoc.Doclet { protected void write_file_header ( GLib.FileStream file, string css, string? title ) { + file.puts ( "" ); file.puts ( "\n" ); file.puts ( "\t\n" ); file.puts ( "\t\tVala Binding Reference\n" ); file.printf ( "\t\t\n", css ); file.puts ( "\t\n" ); file.puts ( "\t\n\n" ); - file.printf ( "\t
      \n", css_site_header ); file.printf ( "\t\t%s Reference Manual\n", (title == null)? "" : title ); file.puts ( "\t
      \n\n" ); - file.printf ( "\t\t
      \n", css_style_body ); } protected void write_file_footer ( GLib.FileStream file ) { file.puts ( "\t
      \n" ); - file.puts ( "\t
      \n" ); file.puts ( "\t\t
      \n" ); file.puts ( "\t\t
      \n" ); diff --git a/src/libvaladoc/Makefile.am b/src/libvaladoc/Makefile.am index edf67a59b..6b1b0ba10 100644 --- a/src/libvaladoc/Makefile.am +++ b/src/libvaladoc/Makefile.am @@ -43,20 +43,20 @@ ccodeinclude_HEADERS = \ AM_CFLAGS = \ + $(LIBGVC_CFLAGS) \ $(LIBXML2_CFLAGS) \ $(GLIB_CFLAGS) \ $(LIBVALA_CFLAGS) \ $(GMODULE_CFLAGS) \ - $(LIBGVC_CFLAGS) \ $(NULL) libvaladoc_la_LIBADD = \ + $(LIBGVC_LIBS) \ $(LIBXML2_LIBS) \ $(GLIB_LIBS) \ $(LIBVALA_LIBS) \ $(GMODULE_LIBS) \ - $(LIBGVC_LIBS) \ $(NULL) diff --git a/src/libvaladoc/doctree.vala b/src/libvaladoc/doctree.vala index 28e92f7ba..88c0dd8b8 100755 --- a/src/libvaladoc/doctree.vala +++ b/src/libvaladoc/doctree.vala @@ -26,9 +26,14 @@ using Gee; namespace Valadoc { public bool copy_file ( string src, string dest ) { GLib.FileStream fsrc = GLib.FileStream.open ( src, "rb" ); + if ( fsrc == null ) { + return false; + } + GLib.FileStream fdest = GLib.FileStream.open ( dest, "wb" ); - if ( fsrc == null || fdest == null ) + if ( fdest == null ) { return false; + } for ( int c = fsrc.getc() ; !fsrc.eof() ; c = fsrc.getc() ) { fdest.putc ( (char)c ); @@ -271,12 +276,12 @@ public abstract class Valadoc.DocumentedElement : Basic { } // internal - public virtual weak DocumentedElement? search_element ( string[] params, int pos ) { + public virtual DocumentedElement? search_element ( string[] params, int pos ) { return null; } // internal - public virtual weak DocumentedElement? search_element_vala ( Gee.ArrayList list, int pos ) { + public virtual DocumentedElement? search_element_vala ( Gee.ArrayList list, int pos ) { return null; } } @@ -294,7 +299,7 @@ public interface Valadoc.EnumHandler : Basic { } } - protected weak DocumentedElement? search_enum_vala ( Gee.ArrayList params, int pos ) { + protected DocumentedElement? search_enum_vala ( Gee.ArrayList params, int pos ) { foreach ( Enum en in this.enums ) { DocumentedElement element = en.search_element_vala ( params, pos+1 ); if ( element != null ) @@ -303,7 +308,7 @@ public interface Valadoc.EnumHandler : Basic { return null; } - protected weak DocumentedElement? search_enum ( string[] params, int pos ) { + protected DocumentedElement? search_enum ( string[] params, int pos ) { foreach ( Enum en in this.enums ) { DocumentedElement element = en.search_element ( params, pos+1 ); if ( element != null ) @@ -355,7 +360,7 @@ public interface Valadoc.DelegateHandler : Basic { get; } - protected weak DocumentedElement? search_delegate_vala ( Gee.ArrayList params, int pos ) { + protected DocumentedElement? search_delegate_vala ( Gee.ArrayList params, int pos ) { Vala.Symbol velement = params[pos+1]; if ( velement is Vala.Delegate == false ) return null; @@ -368,7 +373,7 @@ public interface Valadoc.DelegateHandler : Basic { return null; } - protected weak DocumentedElement? search_delegate ( string[] params, int pos ) { + protected DocumentedElement? search_delegate ( string[] params, int pos ) { pos++; if ( params[pos+1] != null ) @@ -430,7 +435,7 @@ public interface Valadoc.InterfaceHandler : Basic { get; } - protected weak DocumentedElement? search_interface_vala ( Gee.ArrayList params, int pos ) { + protected DocumentedElement? search_interface_vala ( Gee.ArrayList params, int pos ) { foreach ( Interface iface in this.interfaces ) { DocumentedElement? element = iface.search_element_vala ( params, pos+1 ); if ( element != null ) @@ -439,7 +444,7 @@ public interface Valadoc.InterfaceHandler : Basic { return null; } - protected weak DocumentedElement? search_interface ( string[] params, int pos ) { + protected DocumentedElement? search_interface ( string[] params, int pos ) { foreach ( Interface iface in this.interfaces ) { DocumentedElement? element = iface.search_element ( params, pos+1 ); if ( element != null ) @@ -500,7 +505,7 @@ public interface Valadoc.ErrorDomainHandler : Basic { get; } - protected weak DocumentedElement? search_error_domain_vala ( Gee.ArrayList params, int pos ) { + protected DocumentedElement? search_error_domain_vala ( Gee.ArrayList params, int pos ) { foreach ( ErrorDomain errdom in this.errdoms ) { DocumentedElement? element = errdom.search_element_vala ( params, pos+1 ); if ( element != null ) @@ -509,7 +514,7 @@ public interface Valadoc.ErrorDomainHandler : Basic { return null; } - protected weak DocumentedElement? search_error_domain ( string[] params, int pos ) { + protected DocumentedElement? search_error_domain ( string[] params, int pos ) { foreach ( ErrorDomain errdom in this.errdoms ) { DocumentedElement? element = errdom.search_element ( params, pos+1 ); if ( element != null ) @@ -717,7 +722,7 @@ public interface Valadoc.ClassHandler : Basic { get; } - protected weak DocumentedElement? search_class_vala ( Gee.ArrayList params, int pos ) { + protected DocumentedElement? search_class_vala ( Gee.ArrayList params, int pos ) { foreach ( Class cl in this.classes ) { DocumentedElement? element = cl.search_element_vala ( params, pos+1 ); if ( element != null ) @@ -726,7 +731,7 @@ public interface Valadoc.ClassHandler : Basic { return null; } - protected weak DocumentedElement? search_class ( string[] params, int pos ) { + protected DocumentedElement? search_class ( string[] params, int pos ) { foreach ( Class cl in this.classes ) { DocumentedElement? element = cl.search_element ( params, pos+1 ); if ( element != null ) @@ -800,7 +805,7 @@ public interface Valadoc.PropertyHandler : ContainerDataType { set; } - protected weak DocumentedElement? search_property_vala ( Gee.ArrayList params, int pos ) { + protected DocumentedElement? search_property_vala ( Gee.ArrayList params, int pos ) { Vala.Symbol velement = params[pos+1]; if ( velement is Vala.Property == false ) return null; @@ -816,7 +821,7 @@ public interface Valadoc.PropertyHandler : ContainerDataType { return null; } - protected weak DocumentedElement? search_property ( string[] params, int pos ) { + protected DocumentedElement? search_property ( string[] params, int pos ) { pos++; if ( params[pos+1] != null ) @@ -889,7 +894,7 @@ public interface Valadoc.ConstructionMethodHandler : DataType, MethodHandler { get; } - protected weak DocumentedElement? search_construction_method_vala ( Gee.ArrayList params, int pos ) { + protected DocumentedElement? search_construction_method_vala ( Gee.ArrayList params, int pos ) { Vala.Symbol velement = params[pos+1]; if ( velement is Vala.Method == false ) return null; @@ -905,7 +910,7 @@ public interface Valadoc.ConstructionMethodHandler : DataType, MethodHandler { return null; } - protected weak DocumentedElement? search_construction_method ( string[] params, int pos ) { + protected DocumentedElement? search_construction_method ( string[] params, int pos ) { pos++; if ( params[pos+1] == null ) @@ -979,7 +984,7 @@ public interface Valadoc.SignalHandler : ContainerDataType { set; } - protected weak DocumentedElement? search_signal_vala ( Gee.ArrayList params, int pos ) { + protected DocumentedElement? search_signal_vala ( Gee.ArrayList params, int pos ) { Vala.Symbol velement = params[pos+1]; if ( velement is Vala.Signal == false ) return null; @@ -995,7 +1000,7 @@ public interface Valadoc.SignalHandler : ContainerDataType { return null; } - protected weak DocumentedElement? search_signal ( string[] params, int pos ) { + protected DocumentedElement? search_signal ( string[] params, int pos ) { pos++; if ( params[pos+1] != null ) @@ -1058,7 +1063,7 @@ public interface Valadoc.StructHandler : Basic { get; } - protected weak DocumentedElement? search_struct_vala ( Gee.ArrayList params, int pos ) { + protected DocumentedElement? search_struct_vala ( Gee.ArrayList params, int pos ) { foreach ( Struct stru in this.structs ) { DocumentedElement? element = stru.search_element_vala ( params, pos+1 ); if ( element != null ) @@ -1068,7 +1073,7 @@ public interface Valadoc.StructHandler : Basic { } - protected weak DocumentedElement? search_struct ( string[] params, int pos ) { + protected DocumentedElement? search_struct ( string[] params, int pos ) { foreach ( Struct stru in this.structs ) { DocumentedElement? element = stru.search_element ( params, pos+1 ); if ( element != null ) @@ -1223,7 +1228,7 @@ public interface Valadoc.ConstantHandler : Basic { get; } - protected weak DocumentedElement? search_constant_vala ( Gee.ArrayList params, int pos ) { + protected DocumentedElement? search_constant_vala ( Gee.ArrayList params, int pos ) { Vala.Symbol velement = params[pos+1]; if ( velement is Vala.Constant == false ) return null; @@ -1240,7 +1245,7 @@ public interface Valadoc.ConstantHandler : Basic { } // internal - protected weak DocumentedElement? search_constant ( string[] params, int pos ) { + protected DocumentedElement? search_constant ( string[] params, int pos ) { pos++; if ( params[pos+1] != null ) @@ -1307,7 +1312,7 @@ public interface Valadoc.FieldHandler : Basic { get; } - protected weak DocumentedElement? search_field_vala ( Gee.ArrayList params, int pos ) { + protected DocumentedElement? search_field_vala ( Gee.ArrayList params, int pos ) { Vala.Symbol velement = params[pos+1]; if ( velement is Vala.Field == false ) return null; @@ -1324,7 +1329,7 @@ public interface Valadoc.FieldHandler : Basic { } // internal - protected weak DocumentedElement? search_field ( string[] params, int pos ) { + protected DocumentedElement? search_field ( string[] params, int pos ) { pos++; if ( params[pos+1] != null ) @@ -1447,7 +1452,7 @@ public interface Valadoc.MethodHandler : Basic { get; } - protected weak DocumentedElement? search_method_vala ( Gee.ArrayList params, int pos ) { + protected DocumentedElement? search_method_vala ( Gee.ArrayList params, int pos ) { Vala.Symbol velement = params[pos+1]; if ( velement is Vala.Method == false ) return null; @@ -1464,7 +1469,7 @@ public interface Valadoc.MethodHandler : Basic { } // internal - protected weak DocumentedElement? search_method ( string[] params, int pos ) { + protected DocumentedElement? search_method ( string[] params, int pos ) { pos++; if ( params[pos+1] != null ) @@ -2853,7 +2858,7 @@ public class Valadoc.Class : ContainerDataType, Visitable, ClassHandler, StructH } // internal - public override weak DocumentedElement? search_element_vala ( Gee.ArrayList params, int pos ) { + public override DocumentedElement? search_element_vala ( Gee.ArrayList params, int pos ) { Vala.Symbol velement = params[pos]; if ( velement is Vala.Class == false ) @@ -2903,7 +2908,7 @@ public class Valadoc.Class : ContainerDataType, Visitable, ClassHandler, StructH } // internal - public override weak DocumentedElement? search_element ( string[] params, int pos ) { + public override DocumentedElement? search_element ( string[] params, int pos ) { if ( !(this.name == params[pos] || params[0] == "this") ) return null; @@ -3202,7 +3207,7 @@ public class Valadoc.ErrorDomain : DataType, MethodHandler, Visitable { return ( this.verrdom == ver ); } - private weak DocumentedElement? search_error_code ( string[] params, int pos ) { + private DocumentedElement? search_error_code ( string[] params, int pos ) { pos++; if ( params[pos+1] != null ) @@ -3215,7 +3220,7 @@ public class Valadoc.ErrorDomain : DataType, MethodHandler, Visitable { return null; } - private weak DocumentedElement? search_error_code_vala ( Gee.ArrayList params, int pos ) { + private DocumentedElement? search_error_code_vala ( Gee.ArrayList params, int pos ) { Vala.Symbol velement = params[pos+1]; if ( velement is Vala.ErrorCode == false ) return null; @@ -3231,7 +3236,7 @@ public class Valadoc.ErrorDomain : DataType, MethodHandler, Visitable { return null; } - public override weak DocumentedElement? search_element_vala ( Gee.ArrayList params, int pos ) { + public override DocumentedElement? search_element_vala ( Gee.ArrayList params, int pos ) { Vala.Symbol velement = params[pos]; if ( velement is Vala.ErrorDomain == false ) @@ -3257,7 +3262,7 @@ public class Valadoc.ErrorDomain : DataType, MethodHandler, Visitable { } // internal - public override weak DocumentedElement? search_element ( string[] params, int pos ) { + public override DocumentedElement? search_element ( string[] params, int pos ) { if ( this.name != params[pos] ) return null; @@ -3343,7 +3348,7 @@ public class Valadoc.Enum : DataType, MethodHandler, Visitable { return this.venum.get_cname(); } - private weak DocumentedElement? search_enum_value_vala ( Gee.ArrayList params, int pos ) { + private DocumentedElement? search_enum_value_vala ( Gee.ArrayList params, int pos ) { Vala.Symbol velement = params[pos+1]; if ( velement is Vala.EnumValue == false ) return null; @@ -3359,7 +3364,7 @@ public class Valadoc.Enum : DataType, MethodHandler, Visitable { return null; } - private weak DocumentedElement? search_enum_value ( string[] params, int pos ) { + private DocumentedElement? search_enum_value ( string[] params, int pos ) { pos++; if ( params[pos+1] != null ) @@ -3372,7 +3377,7 @@ public class Valadoc.Enum : DataType, MethodHandler, Visitable { return null; } - public override weak DocumentedElement? search_element_vala ( Gee.ArrayList params, int pos ) { + public override DocumentedElement? search_element_vala ( Gee.ArrayList params, int pos ) { Vala.Symbol velement = params[pos]; if ( velement is Vala.Enum == false ) @@ -3398,7 +3403,7 @@ public class Valadoc.Enum : DataType, MethodHandler, Visitable { } // internal - public override weak DocumentedElement? search_element ( string[] params, int pos ) { + public override DocumentedElement? search_element ( string[] params, int pos ) { if ( this.name != params[pos] ) return null; @@ -3524,7 +3529,7 @@ public class Valadoc.Struct : ContainerDataType, Visitable, ConstructionMethodHa get; } - public override weak DocumentedElement? search_element_vala ( Gee.ArrayList params, int pos ) { + public override DocumentedElement? search_element_vala ( Gee.ArrayList params, int pos ) { Vala.Symbol velement = params[pos]; if ( velement is Vala.Struct == false ) @@ -3557,7 +3562,7 @@ public class Valadoc.Struct : ContainerDataType, Visitable, ConstructionMethodHa } // internal - public override weak DocumentedElement? search_element ( string[] params, int pos ) { + public override DocumentedElement? search_element ( string[] params, int pos ) { if ( this.name != params[pos] ) return null; @@ -3659,8 +3664,8 @@ public class Valadoc.Struct : ContainerDataType, Visitable, ConstructionMethodHa this.set_field_type_references ( ); base.set_type_references ( ); - var lst = this.vstruct.get_base_types (); - this.set_parent_references ( lst ); +// var lst = this.vstruct.get_base_types (); +// this.set_parent_references ( lst ); } } @@ -3717,7 +3722,7 @@ public class Valadoc.Interface : ContainerDataType, Visitable, SignalHandler, Pr protected get; } - public override weak DocumentedElement? search_element_vala ( Gee.ArrayList params, int pos ) { + public override DocumentedElement? search_element_vala ( Gee.ArrayList params, int pos ) { Vala.Symbol velement = params[pos]; if ( velement is Vala.Interface == false ) @@ -3761,7 +3766,7 @@ public class Valadoc.Interface : ContainerDataType, Visitable, SignalHandler, Pr } // internal - public override weak DocumentedElement? search_element ( string[] params, int pos ) { + public override DocumentedElement? search_element ( string[] params, int pos ) { if ( !(this.name == params[pos] || params[0] == "this") ) return null; @@ -3954,7 +3959,7 @@ public class Valadoc.Namespace : DocumentedElement, MethodHandler, FieldHandler, } // interface - private weak DocumentedElement? search_namespace ( string[] params, int pos ) { + private DocumentedElement? search_namespace ( string[] params, int pos ) { foreach ( Namespace ns in this.namespaces ) { DocumentedElement? element = ns.search_element ( params, pos+1 ); if ( element != null ) @@ -3964,7 +3969,7 @@ public class Valadoc.Namespace : DocumentedElement, MethodHandler, FieldHandler, } //interface - private weak DocumentedElement? search_namespace_vala ( Gee.ArrayList params, int pos ) { + private DocumentedElement? search_namespace_vala ( Gee.ArrayList params, int pos ) { foreach ( Namespace ns in this.namespaces ) { DocumentedElement? element = ns.search_element_vala ( params, pos+1 ); if ( element != null ) @@ -3973,7 +3978,7 @@ public class Valadoc.Namespace : DocumentedElement, MethodHandler, FieldHandler, return null; } - public override weak DocumentedElement? search_element_vala ( Gee.ArrayList params, int pos ) { + public override DocumentedElement? search_element_vala ( Gee.ArrayList params, int pos ) { Vala.Symbol velement = params[pos]; if ( velement is Vala.Namespace == false ) @@ -4023,7 +4028,7 @@ public class Valadoc.Namespace : DocumentedElement, MethodHandler, FieldHandler, } // internal - public override weak DocumentedElement? search_element ( string[] params, int pos ) { + public override DocumentedElement? search_element ( string[] params, int pos ) { if ( this.name != params[pos] ) return null; @@ -4248,7 +4253,7 @@ public class Valadoc.Package : DocumentedElement, NamespaceHandler { } // internal - public override weak DocumentedElement? search_element ( string[] params, int pos ) { + public override DocumentedElement? search_element ( string[] params, int pos ) { foreach ( Namespace ns in this.namespaces ) { DocumentedElement? element = ns.search_element ( params, pos ); if ( element != null ) @@ -4258,7 +4263,7 @@ public class Valadoc.Package : DocumentedElement, NamespaceHandler { } // internal - public override weak DocumentedElement? search_element_vala ( Gee.ArrayList params, int pos ) { + public override DocumentedElement? search_element_vala ( Gee.ArrayList params, int pos ) { foreach ( Namespace ns in this.namespaces ) { DocumentedElement? element = ns.search_element_vala ( params, pos ); if ( element != null ) @@ -4334,7 +4339,6 @@ public class Valadoc.Tree : Vala.CodeVisitor { this.context.directory = context.basedir; } -// this.context.non_null = !disable_non_null || non_null_experimental; this.context.non_null_experimental = non_null_experimental; this.context.checking = !disable_checking; @@ -4458,7 +4462,7 @@ public class Valadoc.Tree : Vala.CodeVisitor { doclet.initialisation ( this.settings, this ); } - private weak DocumentedElement? search_symbol_in_type ( DocumentedElement element, string[] params, int params_offset = 0 ) { + private DocumentedElement? search_symbol_in_type ( DocumentedElement element, string[] params, int params_offset = 0 ) { if ( !( element.parent is ContainerDataType || element.parent is Enum || element.parent is ErrorDomain ) ) return null; @@ -4474,7 +4478,7 @@ public class Valadoc.Tree : Vala.CodeVisitor { return this.search_symbol_in_symbol ( (DocumentedElement)element.parent, params, 0 ); } - private weak DocumentedElement? search_symbol_in_symbol ( DocumentedElement element, string[] params, int params_offset = 0 ) { + private DocumentedElement? search_symbol_in_symbol ( DocumentedElement element, string[] params, int params_offset = 0 ) { if ( element is Class || element is Interface || element is Struct ) { return element.search_element ( params, params_offset ); } @@ -4487,7 +4491,7 @@ public class Valadoc.Tree : Vala.CodeVisitor { return null; } - private weak DocumentedElement? search_symbol_in_global_namespaces ( DocumentedElement? element, string[] params ) { + private DocumentedElement? search_symbol_in_global_namespaces ( DocumentedElement? element, string[] params ) { int param_size = 0; for ( param_size = 0; params[param_size] != null; param_size++ ); @@ -4499,23 +4503,23 @@ public class Valadoc.Tree : Vala.CodeVisitor { } foreach ( Package pkg in this.packages ) { - DocumentedElement? element = pkg.search_element ( global_params, 0 ); - if ( element != null ) - return element; + DocumentedElement? element2 = pkg.search_element ( global_params, 0 ); + if ( element2 != null ) + return element2; } return null; } - private weak DocumentedElement? search_symbol_in_namespaces ( DocumentedElement element, string[] params ) { + private DocumentedElement? search_symbol_in_namespaces ( DocumentedElement element, string[] params ) { foreach ( Package pkg in this.packages ) { - DocumentedElement? element = pkg.search_element ( params, 0 ); - if ( element != null ) - return element; + DocumentedElement? element2 = pkg.search_element ( params, 0 ); + if ( element2 != null ) + return element2; } return null; } - private weak DocumentedElement? search_element ( DocumentedElement? element, string[] params ) { + private DocumentedElement? search_element ( DocumentedElement? element, string[] params ) { if ( element != null ) { if ( params[0] == "this" ) { return search_symbol_in_type ( element, params, 1 ); @@ -4538,7 +4542,7 @@ public class Valadoc.Tree : Vala.CodeVisitor { return null; } - public weak DocumentedElement? search_symbol_str ( DocumentedElement? element, string symname ) { + public DocumentedElement? search_symbol_str ( DocumentedElement? element, string symname ) { string[] params = symname.split( ".", -1 ); int i = 0; while ( params[i] != null ) i++; params.length = i; @@ -4703,7 +4707,7 @@ public class Valadoc.Tree : Vala.CodeVisitor { } // internal - public weak DocumentedElement? search_vala_symbol ( Vala.Symbol? vnode ) { + public DocumentedElement? search_vala_symbol ( Vala.Symbol? vnode ) { if ( vnode == null ) return null; @@ -4719,7 +4723,7 @@ public class Valadoc.Tree : Vala.CodeVisitor { return null; if ( params.size >= 2 ) { - if ( params[1] is Vala.Namespace ) { + if ( params.get(1) is Vala.Namespace ) { params.remove_at ( 0 ); } } diff --git a/src/libvaladoc/drawer.vala b/src/libvaladoc/drawer.vala index f16d773f9..48cf78f18 100755 --- a/src/libvaladoc/drawer.vala +++ b/src/libvaladoc/drawer.vala @@ -45,8 +45,8 @@ namespace Valadoc.Diagrams { if ( type is Struct == false ) break; - weak Graphviz.Node stru = draw_struct ( g, (Struct)type, me ); - draw_struct_parents ( (Struct)type, g, stru ); + weak Graphviz.Node stru2 = draw_struct ( g, (Struct)type, me ); + draw_struct_parents ( (Struct)type, g, stru2 ); } } diff --git a/src/libvaladoc/old_doctree.vala b/src/libvaladoc/old_doctree.vala deleted file mode 100755 index 5b6a803ce..000000000 --- a/src/libvaladoc/old_doctree.vala +++ /dev/null @@ -1,4708 +0,0 @@ -/* - * Valadoc - a documentation tool for vala. - * Copyright (C) 2008 Florian Brosch - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - - -using Vala; -using GLib; -using Gee; - - -/* -TODO: - - clean up the api - -- rename stuff - -- mark unused stuff - - -- remove the overritten methods from the vala-visitor -*/ - - -// private -public Valadoc.Class glib_error = null; - - -// remove -public enum ExpressionType { - NOT_SET, - STRING, - CHAR, - REAL, - BOOL, - INT, - NULL -} - - - -public enum CommentContext { - ERRORDOMAIN, - ENUMVALUE, - ERRORCODE, - INTERFACE, - DELEGATE, - CONSTANT, - PROPERTY, - SIGNAL, - STRUCT, - CLASS, - FIELD, - ENUM -} - - - -public class Valadoc.Basic : Object { - private string _full_name = null; - - public string? full_name { - get { - if ( this.name == null ) - return null; - - if ( this._full_name == null ) { - this._full_name = this.name; - Basic pos = this.parent; - - while ( pos is File == false ) { - this._full_name = pos.name + "." + this._full_name; - pos = pos.parent; - } - } - - return this._full_name; - } - } - - public string?# package { - get { - SourceReference? sref = this.vsymbol.source_reference; - if ( sref == null ) - return null; - - Vala.SourceFile? file = sref.file; - if ( file == null ) - return null; - - string path = sref.file.filename; - if ( path.has_suffix (".vapi") ) { - string file_name = GLib.Path.get_basename ( path ); - return file_name.ndup ( file_name.size() - ".vapi".size() ); - } - - return this.settings.package_name; - } - } - - protected string? comment_string { - get { - SourceReference sref = this.vsymbol.source_reference; - if ( sref == null ) - return null; - - return sref.comment; - } - set { - SourceReference sref = this.vsymbol.source_reference; - if ( sref == null ) - return ; - - sref.comment = value; - } - } - - //- Nur dort hin packen, wo es gebraucht wird. - public DocumentationTree? documentation { - protected set; - get; - } - - // internal - public virtual Basic? search_element ( string[] params, int pos ) { - return null; - } - - - // <><><><><><><><><> - // <><><><><><><><><> - //Vala.Symbol symbol, Gee.HashMap taglets, CommentContext context - protected void parse_comment_helper ( Valadoc.Parser docparser, CommentContext context ) { - if ( this.documentation != null ) - return ; - - string? docu = this.comment_string; - if ( docu == null ) - return ; - - bool tmp = Parser.is_documentation ( docu ); - if ( tmp == false ) - return ; - - - this.documentation = docparser.parse ( this.head, this, docu ); - } - - public int line { - get { - Vala.SourceReference vsref = this.vsymbol.source_reference; - if ( vsref == null ) - return 0; - - return vsref.first_line; - } - } - - // Herausnehmen, dort übergeben wo es sein muss. - public Valadoc.Settings settings { - construct set; - protected get; - } - - public DataType? parent_data_type { - get { - if ( this.parent is DataType ) - return (DataType)this.parent; - - return null; - } - } - - public string? file_name { - get { - Basic element = this; - while ( element != null ) { - if ( element is File ) - return element.name; - - element = element.parent; - } - return null; - } - } - - // construct set -> creation method - public File? file { - get { - Valadoc.Basic ast = this; - while ( ast is Valadoc.File == false ) { - ast = ast.parent; - if ( ast == null ) - return null; - } - return (Valadoc.File)ast; - } - } - - // construct set -> creation method - public Namespace? nspace { - get { - Valadoc.Basic ast = this; - while ( ast is Valadoc.Namespace == false ) { - ast = ast.parent; - if ( ast == null ) - return null; - } - return (Valadoc.Namespace)ast; - } - } - - public Basic parent { - construct set; - get; - } - - protected Vala.Symbol vsymbol { - // internal - protected get; - set; - } - - public Tree head { - construct set; - protected get; - } - - public virtual string?# name { - get { - return null; - } - } - - - public bool is_public { - get { - Vala.SymbolAccessibility access = vsymbol.access; - return ( access == Vala.SymbolAccessibility.PUBLIC ); - } - } - - public bool is_protected { - get { - Vala.SymbolAccessibility access = vsymbol.access; - return ( access == Vala.SymbolAccessibility.PROTECTED ); - } - } - - public bool is_private { - get { - Vala.SymbolAccessibility access = vsymbol.access; - return ( access == Vala.SymbolAccessibility.PRIVATE ); - } - } - - - // Move to Valadoc.SymbolAccessibility - protected Basic? find_member_lst ( Gee.Collection lst, string name ) { - foreach ( Basic element in lst ) { - if ( element.name == name ) - return element; - } - return null; - } -} - - -public interface Valadoc.EnumHandler : Basic { - protected abstract Gee.ArrayList enums { - private set; - get; - } - - protected void set_enum_type_references ( ) { - foreach ( Enum en in this.enums ) { - en.set_type_references ( ); - } - } - - protected inline Basic? search_enum ( string[] params, int pos ) { - foreach ( Enum en in this.enums ) { - Basic element = en.search_element ( params, pos+1 ); - if ( element != null ) - return element; - } - return null; - } - - public Gee.Collection get_enum_list ( ) { - var lst = new Gee.ArrayList (); - foreach ( Enum en in this.enums ) { - if ( !en.is_type_visitor_accessible ( this ) ) - continue ; - - lst.add ( en ); - } - - return new Gee.ReadOnlyCollection( lst ); - } - - // internal - public Enum? find_enum ( Vala.Enum venum ) { - foreach ( Enum en in this.enums ) { - if ( en.is_venum( venum ) ) - return en; - } - - return null; - } - - public void visit_enums ( Doclet doclet ) { - foreach ( Enum en in this.enums ) { - en.visit( doclet ); - } - } - - public void add_enums ( Gee.Collection venums ) { - foreach ( Vala.Enum venum in venums ) { - this.add_enum ( venum ); - } - } - - public void add_enum ( Vala.Enum venum ) { - Enum tmp = new Enum ( this.settings, venum, this, this.head ); - tmp.initialisation ( ); - this.enums.add( tmp ); - } - - protected void parse_enum_comments ( Valadoc.Parser docparser ) { - foreach ( Enum en in this.enums ) { - en.parse_comments ( docparser ); - } - } -} - - - -public interface Valadoc.DelegateHandler : Basic { - protected abstract Gee.ArrayList delegates { - private set; - get; - } - - protected inline Basic? search_delegate ( string[] params, int pos ) { - pos++; - - if ( params[pos+1] != null ) - return null; - - foreach ( Delegate del in this.delegates ) { - if ( del.name == params[pos] ) - return del; - } - return null; - } - - public Gee.Collection get_delegate_list ( ) { - var lst = new Gee.ArrayList (); - foreach ( Delegate del in this.delegates ) { - if ( !del.is_type_visitor_accessible ( this ) ) - continue ; - - lst.add ( del ); - } - - return new Gee.ReadOnlyCollection( lst ); - } - - // internal - public Delegate? find_delegate ( Vala.Delegate vdel ) { - foreach ( Delegate del in this.delegates ) { - if ( del.is_vdelegate( vdel ) ) - return del; - } - - return null; - } - - public void visit_delegates ( Doclet doclet ) { - foreach ( Delegate del in this.delegates ) { - del.visit ( doclet ); - } - } - - public void add_delegates ( Gee.Collection vdels ) { - foreach ( Vala.Delegate vdel in vdels ) { - this.add_delegate ( vdel ); - } - } - - public void add_delegate ( Vala.Delegate vdel ) { - var tmp = new Delegate ( this.settings, vdel, this, this.head, 0 ); - this.delegates.add ( tmp ); - tmp.initialisation ( ); - } - - public void set_delegate_type_references ( ) { - foreach ( Delegate del in this.delegates ) { - del.set_type_references ( ); - } - } - - public void parse_delegate_comments ( Valadoc.Parser docparser ) { - foreach ( Delegate del in this.delegates ) { - del.parse_comment ( docparser ); - } - } -} - - - -public interface Valadoc.InterfaceHandler : Basic { - protected abstract Gee.ArrayList interfaces { - private set; - get; - } - - protected inline Basic? search_interface ( string[] params, int pos ) { - foreach ( Interface iface in this.interfaces ) { - Basic element = iface.search_element ( params, pos+1 ); - if ( element != null ) - return element; - } - return null; - } - - public Gee.Collection get_interface_list ( ) { - var lst = new Gee.ArrayList (); - foreach ( Interface iface in this.interfaces ) { - if ( !iface.is_type_visitor_accessible ( this ) ) - continue ; - - lst.add ( iface ); - } - - return new Gee.ReadOnlyCollection( lst ); - } - - // internal - public Interface? find_interface ( Vala.Interface viface ) { - foreach ( Interface iface in this.interfaces ) { - if ( iface.is_vinterface( viface ) ) - return iface; - } - - return null; - } - - public void visit_interfaces ( Doclet doclet ) { - foreach ( Interface iface in this.interfaces ) { - iface.visit( doclet ); - } - } - - protected void add_interfaces ( Gee.Collection vifaces ) { - foreach ( Vala.Interface viface in vifaces ) { - this.add_interface ( viface ); - } - } - - // inline - public void add_interface ( Vala.Interface viface ) { - var tmp = new Interface ( this.settings, viface, this, this.head ); - this.interfaces.add ( tmp ); - tmp.initialisation ( ); - } - - protected void set_interface_type_references ( ) { - foreach ( Interface iface in this.interfaces ) { - iface.set_type_references ( ); - } - } - - protected void parse_interface_comments ( Valadoc.Parser docparser ) { - foreach ( Interface iface in this.interfaces ) { - iface.parse_comments ( docparser ); - } - } -} - - - -public interface Valadoc.ErrorDomoainHandler : Basic { - protected abstract Gee.ArrayList errdoms { - private set; - get; - } - - protected inline Basic? search_error_domain ( string[] params, int pos ) { - foreach ( ErrorDomain errdom in this.errdoms ) { - Basic element = errdom.search_element ( params, pos+1 ); - if ( element != null ) - return element; - } - return null; - } - - public Gee.Collection get_error_domain_list ( ) { - var lst = new Gee.ArrayList (); - foreach ( ErrorDomain errdom in this.errdoms ) { - if ( !errdom.is_type_visitor_accessible ( this ) ) - continue ; - - lst.add ( errdom ); - } - - return new Gee.ReadOnlyCollection( lst ); - } - - // internal - public ErrorDomain? find_errordomain ( Vala.ErrorDomain ver ) { - foreach ( ErrorDomain errdom in this.errdoms ) { - if ( errdom.is_verrordomain( ver ) ) - return errdom; - } - return null; - } - - public void visit_error_domains ( Doclet doclet ) { - foreach ( ErrorDomain errdom in this.errdoms ) { - errdom.visit ( doclet ); - } - } - - public void add_error_domains ( Gee.Collection verrdoms ) { - foreach ( Vala.ErrorDomain verrdom in verrdoms ) { - this.add_error_domain ( verrdom ); - } - } - - public void add_error_domain ( Vala.ErrorDomain verrdom ) { - var tmp = new ErrorDomain ( this.settings, verrdom, this, this.head ); - tmp.initialisation ( ); - this.errdoms.add ( tmp ); - } - - protected void set_errordomain_type_referenes ( ) { - foreach ( ErrorDomain errdom in this.errdoms ) { - errdom.set_type_references ( ); - } - } - - protected void parse_errordomain_comments ( Valadoc.Parser docparser ) { - foreach ( ErrorDomain errdom in this.errdoms ) { - errdom.parse_comments ( docparser ); - } - } -} - - - - -public interface Valadoc.Writeable : Basic { - public abstract DocumentationTree? documentation { - protected set; - get; - } - - // rename to write_documentation - public bool write_comment ( void* ptr ) { - if ( this.documentation == null ) - return false; - - this.documentation.write ( ptr ); - return true; - } -} - - - -public interface Valadoc.NamespaceHandler : Basic { - public abstract Gee.ArrayList namespaces { - private set; - get; - } - - public Gee.ReadOnlyCollection get_namespace_list () { - return new Gee.ReadOnlyCollection ( this.namespaces ); - } - - public void visit_namespaces ( Doclet doclet ) { - foreach ( Namespace ns in this.namespaces ) { - ns.visit ( doclet ); - } - } - - private Gee.ArrayList create_parent_vnamespace_list ( Vala.Symbol vsymbol ) { - var lst = new Gee.ArrayList (); - if ( vsymbol.name == null ) { - lst.add ( (Vala.Namespace)vsymbol ); - return lst; - } - - - while ( vsymbol.name != null ) { - if ( vsymbol is Vala.Namespace ) { - lst.insert ( 0, (Vala.Namespace)vsymbol ); - } - vsymbol = vsymbol.parent_symbol; - } - return lst; - } - - // rename - // internal - public void add__namespace ( Namespace ns ) { - this.namespaces.add ( ns ); - } - - // internal - public Namespace get_namespace_helper ( Vala.Symbol node, Gee.List vnspaces, int pos ) { - Vala.Namespace vns = vnspaces.get( pos ); - - Namespace ns = this.find_namespace_without_childs ( vns ); - if ( ns == null ) { - ns = new Namespace( this.settings, vns, this, this.head ); - this.namespaces.add ( ns ); - ns.initialisation( ); - } - - if ( pos == 0 ) { - return ns; - } - - return ns.get_namespace_helper ( node, vnspaces, pos+1 ); - } - - // TODO: Rename vars - protected Namespace get_namespace ( Vala.Symbol node ) { - Vala.Symbol vnd = ((Vala.Symbol)node).parent_symbol; - if ( vnd is Vala.Namespace == false ) - vnd = vnd.parent_symbol; - - Vala.Namespace vnspace = (Vala.Namespace)vnd; - var nspace = this.find_namespace ( vnspace ); - if ( nspace != null ) - return nspace; - - - var vnspaces = this.create_parent_vnamespace_list ( node ); - - if ( vnspaces.size > 2 ) { - return this.get_namespace_helper ( node, vnspaces, 1 ); - } - else { - var ns = new Namespace( this.settings, vnspace, this, this.head ); - this.namespaces.add( ns ); - ns.initialisation( ); - return ns; - } - } - - // internal - public Namespace? find_vnamespace_helper ( Gee.List vnspaces, int pos ) { - - Vala.Namespace? vns = vnspaces.get ( pos ); - if ( vns == null ) { - return null; - } - - foreach ( Namespace ns in this.namespaces ) { - if ( ns.name != vns.name ) { - continue ; - } - - if ( pos == 0 ) { - return ns; - } - - return ns.find_vnamespace_helper ( vnspaces, pos+-1 ); - } - - return null; - } - - // internal? - private Namespace find_namespace_without_childs ( Vala.Namespace vns ) { - Namespace ns2 = null; - - foreach ( Namespace ns in this.namespaces ) { - if ( ns.is_vnspace(vns) ) - ns2 = ns; - } - - return ns2; - } - - // internal - public Namespace find_namespace ( Vala.Namespace vns ) { - var vnspaces = this.create_parent_vnamespace_list ( vns ); - int i = 0; - - foreach ( Vala.Namespace n_s in vnspaces ) { - i++; - } - - return this.find_vnamespace_helper ( vnspaces, vnspaces.size-1 ); - } - - // internal - public void set_namespace_type_references ( ) { - foreach ( Namespace ns in this.namespaces ){ - ns.set_type_references (); - } - } - - // internal - public void namespace_inheritance ( ) { - foreach ( Namespace ns in this.namespaces ){ - ns.inheritance( ); - } - } - - // internal - public void parse_namespace_comments ( Valadoc.Parser docparser ) { - foreach ( Namespace ns in this.namespaces ){ - ns.parse_comments ( docparser ); - } - } -} - - - -public interface Valadoc.ClassHandler : Basic { - // remove - protected abstract Gee.ArrayList classes { - set; - get; - } - - public abstract uint bracket_level { - construct set; - protected get; - } - - protected inline Basic? search_class ( string[] params, int pos ) { - foreach ( Class cl in this.classes ) { - Basic element = cl.search_element ( params, pos+1 ); - if ( element != null ) - return element; - } - return null; - } - - protected Class? find_vclass ( Vala.Class vcl ) { - foreach ( Class cl in this.classes ) { - if ( cl.is_vclass ( vcl ) ) - return cl; - - var tmp = cl.find_vclass ( vcl ); - if ( tmp != null ) - return tmp; - } - return null; - } - - public Gee.ReadOnlyCollection get_class_list ( ) { - var lst = new Gee.ArrayList (); - foreach ( Class cl in this.classes ) { - if ( !cl.is_type_visitor_accessible ( this ) ) - continue ; - - lst.add ( cl ); - } - - return new Gee.ReadOnlyCollection( lst ); - } - - // internal, remove - public void append_class ( Valadoc.Class cl ) { - this.classes.add( cl ); - } - - // internal - public void add_class ( Vala.Class vcl ) { - Class cl = new Class ( this.settings, vcl, this, this.head, 0 ); - this.classes.add ( cl ); - cl.initialisation( ); - } - - public void add_classes ( Gee.Collection vclasses ) { - foreach ( Vala.Class vcl in vclasses ) { - this.add_class ( vcl ); - } - } - - - public void visit_classes ( Doclet doclet ) { - foreach ( Class cl in this.get_class_list() ) { - cl.visit ( doclet ); - } - } - - protected void set_class_type_references ( ) { - foreach ( Class cl in this.classes ) { - cl.set_type_references (); - } - } - - protected void parse_class_comments ( Valadoc.Parser docparser ) { - foreach ( Class cl in this.classes ) { - cl.parse_comments ( docparser ); - } - } -} - - - -public interface Valadoc.PropertyHandler : ContainerDataType { - protected abstract Gee.ArrayList properties { - get; - set; - } - - protected inline Basic? search_property ( string[] params, int pos ) { - pos++; - - if ( params[pos+1] != null ) - return null; - - foreach ( Property prop in this.properties ) { - if ( prop.name == params[pos] ) - return prop; - } - return null; - } - - protected bool is_overwritten_property ( Property prop ) { - foreach ( Property p in this.properties ) { - if ( p.parent != this ) - continue ; - - if ( !p.is_override ) - continue ; - - if ( p.equals ( prop ) ) - return true; - } - return false; - } - - public Gee.ReadOnlyCollection get_property_list ( ) { - var lst = new Gee.ArrayList (); - foreach ( Property p in this.properties ) { - if ( !p.is_type_visitor_accessible ( this ) ) - continue ; - - lst.add ( p ); - } - - return new Gee.ReadOnlyCollection( lst ); - } - - protected void parse_property_comments ( Valadoc.Parser docparser ) { - foreach ( Property prop in this.properties ) { - prop.parse_comment ( docparser ); - } - } - - public void visit_properties ( Doclet doclet ) { - foreach ( Property prop in this.get_property_list () ) - prop.visit ( doclet ); - } - - // rename to set_property_type_references - protected void set_property_type_reference () { - foreach ( Property prop in this.properties ) { - prop.set_type_references ( ); - } - } - - protected void add_properties ( Gee.Collection vproperties ) { - foreach ( Vala.Property vprop in vproperties ) { - var tmp = new Property ( this.settings, vprop, this, this.head, this.bracket_level + 1 ); - tmp.initialisation ( ); - this.properties.add ( tmp ); - } - } -} - - -public interface Valadoc.ConstructionMethodHandler : DataType, MethodHandler { - protected abstract Gee.ArrayList construction_methods { - set; - get; - } - - protected inline Basic? search_construction_method ( string[] params, int pos ) { - pos++; - - if ( params[pos+1] == null ) - return null; - - if ( params[pos+2] != null ) - return null; - - string name = params[pos] + "." + params[pos+1]; - - foreach ( Method m in this.construction_methods ) { - if ( m.name == name ) - return m; - } - return null; - } - - public Gee.ReadOnlyCollection get_construction_method_list ( ) { - var lst = new Gee.ArrayList (); - foreach ( Method cm in this.construction_methods ) { - if ( !cm.is_type_visitor_accessible ( this ) ) - continue ; - - lst.add ( cm ); - } - - return new Gee.ReadOnlyCollection( lst ); - } - - protected void parse_construction_method_comments ( Valadoc.Parser docparser ) { - foreach ( Method cm in this.construction_methods ) { - cm.parse_comment ( docparser ); - } - } - - protected void set_construction_method_references ( ) { - foreach ( Method cm in this.construction_methods ) { - cm.set_type_references ( ); - } - } - - public void visit_construction_methods ( Doclet doclet ) { - foreach ( Method m in this.get_construction_method_list() ) { - m.visit ( doclet, this ); - } - } - - protected void add_methods_and_construction_methods ( Gee.Collection vmethods ) { - foreach ( Vala.Method vm in vmethods ) { - var tmp = new Method ( this.settings, vm, this, this.head, this.bracket_level + 1 ); - tmp.initialisation ( ); - if ( tmp.is_constructor ) - this.construction_methods.add ( tmp ); - else - this.methods.add ( tmp ); - } - } -} - - - -public interface Valadoc.SignalHandler : ContainerDataType { - protected abstract Gee.ArrayList signals { - get; - set; - } - - protected inline Basic? search_signal ( string[] params, int pos ) { - pos++; - - if ( params[pos+1] != null ) - return null; - - foreach ( Signal sig in this.signals ) { - if ( sig.name == params[pos] ) - return sig; - } - return null; - } - - // internal - public void add_signals ( Gee.Collection vsignals ) { - foreach ( Vala.Signal vsig in vsignals ) { - var tmp = new Signal ( this.settings, vsig, this, this.head, this.bracket_level + 1 ); - tmp.initialisation (); - this.signals.add ( tmp ); - } - } - - public void visit_signals ( Doclet doclet ) { - foreach ( Signal sig in this.get_signal_list ( ) ) { - sig.visit ( doclet ); - } - } - - public Gee.ReadOnlyCollection get_signal_list () { - var lst = new Gee.ArrayList (); - foreach ( Signal sig in this.signals ) { - if ( !sig.is_type_visitor_accessible ( this ) ) - continue ; - - lst.add ( sig ); - } - - return new Gee.ReadOnlyCollection( lst ); - } - - // internal - protected void set_signal_type_references () { - foreach ( Signal sig in this.signals ) { - sig.set_type_references ( ); - } - } - - // internal - protected void parse_signal_comments ( Valadoc.Parser docparser ) { - foreach ( Signal sig in this.signals ) { - sig.parse_comment ( docparser ); - } - } -} - - - -public interface Valadoc.StructHandler : Basic { - protected abstract Gee.ArrayList structs { - set; - get; - } - - public abstract uint bracket_level { - construct set; - protected get; - } - - protected inline Basic? search_struct ( string[] params, int pos ) { - foreach ( Struct stru in this.structs ) { - Basic element = stru.search_element ( params, pos+1 ); - if ( element != null ) - return element; - } - return null; - } - - public Gee.Collection get_struct_list ( ) { - var lst = new Gee.ArrayList (); - foreach ( Struct stru in this.structs ) { - if ( !stru.is_type_visitor_accessible ( this ) ) - continue ; - - lst.add ( stru ); - } - - return new Gee.ReadOnlyCollection( lst ); - } - - // internal, remove - public void append_struct ( Valadoc.Struct stru ) { - this.structs.add( stru ); - } - - public void add_struct ( Vala.Struct vstru ) { - Struct stru = new Struct ( this.settings, vstru, this, this.head, 0 ); - this.structs.add( stru ); - stru.initialisation( ); - } - - public void add_structs ( Gee.Collection vstructs ) { - foreach ( Vala.Struct vstru in vstructs ) { - this.add_struct ( vstru ); - } - } - - public void visit_structs ( Doclet doclet ) { - foreach ( Struct stru in this.get_struct_list() ) { - stru.visit ( doclet ); - } - } - - protected void set_struct_type_references ( ) { - foreach ( Struct stru in this.structs ) { - stru.set_type_references ( ); - } - } - - protected void parse_struct_comments ( Valadoc.Parser docparser ) { - foreach ( Struct stru in this.structs ) { - stru.parse_comments ( docparser ); - } - } -} - - - -public interface Valadoc.Visitable : Basic, SymbolAccessibility { - protected bool is_type_visitor_accessible ( Valadoc.Basic element ) { - if ( !this.settings._private && this.is_private ) - return false; - - if ( !this.settings._protected && this.is_protected ) - return false; - - if ( this.parent != element && !this.settings.add_inherited ) - return false; - - return true; - } - - protected bool is_visitor_accessible ( ) { - if ( !this.settings._private && this.is_private ) - return false; - - if ( !this.settings._protected && this.is_protected ) - return false; - - return true; - } -} - - -public interface Valadoc.SymbolAccessibility { - public abstract bool is_public { - get; - } - - public abstract bool is_protected { - get; - } - - public abstract bool is_private { - get; - } -} - - - -public interface Valadoc.ReturnTypeHandler : Basic { - public abstract TypeReference return_type { - protected set; - get; - } - - // internal - public void set_return_type_references ( ) { - if ( this.return_type == null ) - return ; - - this.return_type.set_type_references ( ); - } - - // internal - protected void set_ret_type ( Vala.DataType vtref ) { - var tmp = new TypeReference.return_type ( this.settings, vtref, this, this.head ); - this.return_type = tmp; - } -} - - -// ???? -public interface Valadoc.TypeHandler : Basic { - public abstract TypeReference type_reference { - protected set; - get; - } - - public void set_type_references ( ) { - if ( this.type_reference == null ) - return ; - - this.type_reference.set_type_references ( ); - } - - // ??? - protected void set_ret_type ( Vala.DataType vtref ) { - var tmp = new TypeReference ( this.settings, vtref, this, this.head ); - this.type_reference = tmp; - } -} - - -public interface Valadoc.ConstantHandler : Basic { - protected abstract Gee.ArrayList constants { - protected set; - get; - } - - // internal - protected inline Basic? search_constant ( string[] params, int pos ) { - pos++; - - if ( params[pos+1] != null ) - return null; - - foreach ( Constant c in this.constants ) { - if ( c.name == params[pos] ) - return c; - } - return null; - } - - public Gee.ReadOnlyCollection get_constant_list ( ) { - var lstd = new Gee.ArrayList (); - foreach ( Constant c in this.constants ) { - if ( !c.is_type_visitor_accessible ( this ) ) - continue ; - - lstd.add ( c ); - } - - return new Gee.ReadOnlyCollection( lstd ); - } - - // internal - public void add_constants ( Gee.Collection vconstants ) { - foreach ( Vala.Constant vc in vconstants ) { - this.add_constant ( vc ); - } - } - - // internal - public void add_constant ( Vala.Constant vc ) { - var tmp = new Constant ( this.settings, vc, this, this.head ); - this.constants.add ( tmp ); - tmp.initialisation ( ); - } - - // internal - public void set_constant_type_references ( ) { - foreach ( Constant c in this.constants ) { - c.set_type_references ( ); - } - } - - // internal - public void parse_constant_comments ( Valadoc.Parser docparser ) { - foreach ( Constant c in this.constants ) { - c.parse_comment ( docparser ); - } - } - - public void visit_constants ( Doclet doclet ) { - foreach ( Constant c in this.get_constant_list() ) { - c.visit ( doclet, this ); - } - } -} - - -public interface Valadoc.FieldHandler : Basic { - protected abstract Gee.ArrayList fields { - protected set; - get; - } - - public abstract uint bracket_level { - construct set; - get; - } - - // internal - protected inline Basic? search_field ( string[] params, int pos ) { - pos++; - - if ( params[pos+1] != null ) - return null; - - foreach ( Field f in this.fields ) { - if ( f.name == params[pos] ) - return f; - } - return null; - } - - public Gee.ReadOnlyCollection get_field_list ( ) { - var lstd = new Gee.ArrayList (); - foreach ( Field f in this.fields ) { - if ( !f.is_type_visitor_accessible ( this ) ) - continue ; - - lstd.add ( f ); - } - - return new Gee.ReadOnlyCollection( lstd ); - } - - // internal - public void add_fields ( Gee.Collection vfields ) { - foreach ( Vala.Field vf in vfields ) { - this.add_field ( vf ); - } - } - - // internal - public void add_field ( Vala.Field vf ) { - var tmp = new Field ( this.settings, vf, this, this.head, 0 /* this.bracket_level + 1 */ ); - this.fields.add ( tmp ); - tmp.initialisation ( ); - } - - // internal - public void set_field_type_references ( ) { - foreach ( Field field in this.fields ) { - field.set_type_references ( ); - } - } - - // internal - public void parse_field_comments ( Valadoc.Parser docparser ) { - foreach ( Field field in this.fields ) { - field.parse_comment ( docparser ); - } - } - - public void visit_fields ( Doclet doclet ) { - foreach ( Field field in this.get_field_list() ) { - field.visit ( doclet, this ); - } - } -} - - - -public interface Valadoc.ExceptionHandler : Basic { - protected abstract Gee.ArrayList err_domains { - protected set; - get; - } - - public Gee.ReadOnlyCollection get_error_domains ( ) { - return new Gee.ReadOnlyCollection ( this.err_domains ); - } - - // internal - public void add_error_domains ( Gee.Collection vexceptions ) { - foreach ( Vala.DataType vtref in vexceptions ) { - var tmp = new TypeReference ( this.settings, vtref, (Valadoc.Basic)this, this.head ); - this.err_domains.add ( tmp ); - } - } - - // internal - public void set_exception_type_references ( ) { - foreach ( TypeReference tref in this.err_domains ) { - tref.set_type_references ( ); - } - } -} - - - -public interface Valadoc.ParameterListHandler : Basic { - protected abstract Gee.ArrayList param_list { - protected set; - get; - } - - public abstract uint bracket_level { - construct set; - get; - } - - public Gee.ReadOnlyCollection get_parameter_list ( ) { - return new Gee.ReadOnlyCollection ( this.param_list ); - } - - protected void add_parameter_list ( Gee.Collection vparams ) { - foreach ( Vala.FormalParameter vfparam in vparams ) { - var tmp = new FormalParameter ( this.settings, vfparam, this, this.head ); - tmp.initialisation ( ); - this.param_list.add ( tmp ); - } - } - - // internal - public void set_parameter_list_type_references ( ) { - foreach ( FormalParameter fparam in this.param_list ) { - fparam.set_type_references ( ); - } - } -} - - - -public interface Valadoc.MethodHandler : Basic { - protected abstract Gee.ArrayList methods { - protected set; - get; - } - - public abstract uint bracket_level { - construct set; - get; - } - - // internal - protected inline Basic? search_method ( string[] params, int pos ) { - pos++; - - if ( params[pos+1] != null ) - return null; - - foreach ( Method m in this.methods ) { - if ( m.name == params[pos] ) - return m; - } - return null; - } - - // internal - public void set_method_type_references ( ) { - foreach ( Method m in this.methods ) { - m.set_type_references ( ); - } - } - - // internal - public void parse_method_comments ( Valadoc.Parser docparser ) { - foreach ( Method m in this.methods ) { - m.parse_comment ( docparser ); - } - } - - protected void add_method ( Vala.Method vmethod ) { - var tmp = new Method ( this.settings, vmethod, this, this.head, 0 ); - tmp.initialisation ( ); - this.methods.add ( tmp ); - } - - protected void add_methods ( Gee.Collection vmethods ) { - foreach ( Vala.Method vm in vmethods ) { - this.add_method ( vm ); - } - } - - public void visit_methods ( Doclet doclet ) { - foreach ( Method m in this.get_method_list() ) { - m.visit ( doclet, this ); - } - } - - - public Gee.ReadOnlyCollection get_method_list ( ) { - var lst = new Gee.ArrayList (); - foreach ( Method m in this.methods ) { - if ( !m.is_type_visitor_accessible ( this ) ) - continue ; - - lst.add ( m ); - } - - return new Gee.ReadOnlyCollection( lst ); - } -} - - - -public interface Valadoc.TemplateParameterListHandler : Basic { - protected abstract Gee.ArrayList template_param_lst { - set; - get; - } - - public Gee.ReadOnlyCollection get_template_param_list ( ) { - return new Gee.ReadOnlyCollection ( this.template_param_lst ); - } - - // internal - public void set_template_parameter_list ( Gee.Collection vtparams ) { - foreach ( Vala.TypeParameter vtparam in vtparams ) { - var tmp = new TypeParameter ( this.settings, vtparam, this, this.head ); - tmp.initialisation ( ); - this.template_param_lst.add ( tmp ); - } - } - - // internal - public void set_template_parameter_list_references ( ) { - foreach ( TypeParameter tparam in this.template_param_lst ) { - tparam.set_type_reference ( ); - } - } -} - - - -public class Valadoc.Constant : Basic, SymbolAccessibility, TypeHandler, Visitable, Writeable { - public TypeReference type_reference { - protected set; - get; - } - - public Vala.Constant vconst { - construct set; - private get; - } - - public override string?# name { - get { - return this.vconst.name; - } - } - - public void initialisation ( ) { - this.vsymbol = this.vconst; - - var vret = this.vconst.type_reference; - this.set_ret_type ( vret ); - } - - public Constant ( Valadoc.Settings settings, Vala.Constant vconst, ConstantHandler parent, Tree head ) { - this.settings = settings; - this.vconst = vconst; - this.parent = parent; - this.head = head; - } - - // internal - public void set_type_references ( ) { - ((TypeHandler)this).set_type_references ( ); - } - - // internal - public void parse_comment ( Valadoc.Parser docparser ) { - this.parse_comment_helper ( docparser, CommentContext.CONSTANT ); - } - - public void visit ( Doclet doclet, ConstantHandler? parent ) { - if ( !this.is_visitor_accessible ( ) ) - return ; - - doclet.visit_constant ( this, parent ); - } - - public void write ( Langlet langlet, void* ptr, ConstantHandler parent ) { - langlet.write_constant ( this, parent, ptr ); - } -} - - -public class Valadoc.Field : Basic, SymbolAccessibility, TypeHandler, Visitable, Writeable { - public Field ( Valadoc.Settings settings, Vala.Field vfield, FieldHandler parent, Tree head, uint bracket_level ) { - this.bracket_level = bracket_level; - this.settings = settings; - this.vfield = vfield; - this.parent = parent; - this.head = head; - } - - public string? get_cname () { - return this.vfield.get_cname(); - } - - public uint bracket_level { - construct set; - get; - } - - public TypeReference type_reference { - protected set; - get; - } - - public override string?# name { - get { - return this.vfield.name; - } - } - - // internal - public void initialisation ( ) { - this.vsymbol = this.vfield; - - var vret = this.vfield.field_type; - this.set_ret_type ( vret ); - } - - public Vala.Field vfield { - construct set; - private get; - } - - public bool is_volatile { - get { - return this.vfield.is_volatile; - } - } - - // remove - public bool is_global { - get { - return ( this.parent is Valadoc.Namespace ); - } - } - - // internal - public void set_type_references ( ) { - ((TypeHandler)this).set_type_references ( ); - } - - // internal - public void parse_comment ( Valadoc.Parser docparser ) { - this.parse_comment_helper ( docparser, CommentContext.FIELD ); - } - - public void visit ( Doclet doclet, FieldHandler? parent ) { - if ( !this.is_visitor_accessible ( ) ) - return ; - - doclet.visit_field ( this, parent ); - } - - public void write ( Langlet langlet, void* ptr, FieldHandler parent ) { - langlet.write_field ( this, parent, ptr ); - } -} - - - -public class Valadoc.TypeReference : Basic { - public TypeReference ( Valadoc.Settings settings, Vala.DataType vtyperef, Basic parent, Tree head ) { - this.is_return_type = false; - this.settings = settings; - this.vtyperef = vtyperef; - this.parent = parent; - this.head = head; - } - - // remove - public TypeReference.return_type ( Valadoc.Settings settings, Vala.DataType vtyperef, Basic parent, Tree head ) { - this.is_return_type = true; - this.settings = settings; - this.vtyperef = vtyperef; - this.parent = parent; - this.head = head; - } - - // remove - public bool is_return_type { - construct set; - protected get; - } - - protected Gee.ArrayList type_arguments = new Gee.ArrayList (); - - public Gee.ReadOnlyCollection get_type_arguments ( ) { - return new Gee.ReadOnlyCollection ( this.type_arguments ); - } - - private void set_template_argument_list ( Gee.Collection varguments ) { - foreach ( Vala.DataType vdtype in varguments ) { - var dtype = new TypeReference ( this.settings, vdtype, this, this.head ); - dtype.set_type_references ( ); - this.type_arguments.add ( dtype ); - } - } - - public DataType data_type { - private set; - get; - } - - public Vala.DataType vtyperef { - construct set; - private get; - } - - public bool pass_ownership { - get { - Vala.CodeNode? node = this.vtyperef.parent_node; - if ( node == null ) - return false; - - if ( node is Vala.FormalParameter ) { - return ( ((Vala.FormalParameter)node).direction == ParameterDirection.IN && - ((Vala.FormalParameter)node).parameter_type.value_owned ); - } - - if ( node is Vala.Property ) { - return ((Vala.Property)node).property_type.value_owned; - } - - return false; - } - } - - // from vala/valainterfacewriter.vala - private bool is_weak_helper (Vala.DataType type) { - if (type.value_owned) { - return false; - } else if (type is VoidType || type is PointerType) { - return false; - } else if (type is ValueType) { - if (type.nullable) { - // nullable structs are heap allocated - return false; - } - } - return true; - } - - public bool is_weak { - get { - Vala.CodeNode? node = this.vtyperef.parent_node; - if ( node == null ) - return false; - - if ( node is Vala.FormalParameter ) { - if ( ((Vala.FormalParameter)node).direction == Vala.ParameterDirection.IN) - return false; - - if ( ((Vala.FormalParameter)node).direction == Vala.ParameterDirection.OUT) - return false; - - return !this.vtyperef.value_owned; - } - - return is_weak_helper( this.vtyperef ); - } - } - - public bool is_nullable { - get { - return this.vtyperef.nullable && this.vtyperef is Vala.PointerType == false; - } - } - - public bool is_pointer { - get { - return this.vtyperef is Vala.PointerType; - } - } - - public uint pointer_rank { - get { - if ( !this.is_pointer ) - return 0; - - Vala.DataType vdtype = this.vtyperef; - for ( int i = 0 ;; i++ ) { - if ( vdtype is Vala.PointerType == false ) - return i; - - vdtype = ((Vala.PointerType)vdtype).base_type; - } - return 0; - } - } - - public bool is_array { - get { - return this.vtyperef.is_array(); - } - } - - public uint array_rank { - get { - if ( !this.is_array ) - return 0; - - return ((Vala.ArrayType)vtyperef).rank; - } - } - - public string?# type_nspace_name { - get { - - if ( this.data_type == null ) - return null; - - if ( this.data_type.nspace == null ) - return null; - - return this.data_type.nspace.name; - } - } - - - private string extract_type_name ( Vala.DataType vdtype ) { - if ( vdtype is Vala.VoidType ) { - return "void"; - } - else if ( vdtype is Vala.PointerType ) { - return this.extract_type_name ( ((Vala.PointerType)vdtype).base_type ); - } - else if ( vdtype is Vala.DelegateType ) { - return ((Vala.DelegateType)this.vtyperef).delegate_symbol.name; - } - else if ( vdtype is Vala.MethodType ) { - return ((Vala.MethodType)this.vtyperef).method_symbol.name; - } - else if ( vdtype is Vala.SignalType ) { - return ((Vala.SignalType)this.vtyperef).signal_symbol.name; - } - else if ( vdtype is Vala.ArrayType ) { - this.extract_type_name ( ((Vala.ArrayType)vdtype).element_type ); - } - /* - else if ( vdtype is FieldPrototype ) { - // Vala.Field field_symbol - } - InvalidType // nix - // ReferenceType - TypeParameterType - UnresolvedType //Vala.UnresolvedSymbol unresolved_symbol - ValueType // Vala.TypeSymbol type_symbol - */ - return vtyperef.to_string(); - } - - // remove - public string# type_name { - get { - return this.extract_type_name ( this.vtyperef ); - /* - Vala.TypeSymbol? vdtype = null; - if ( this.vtyperef is Vala.VoidType ) { - return "void"; - } - else if ( this.vtyperef is Vala.PointerType ) { - vdtype = ((Vala.PointerType)this.vtyperef).base_type.data_type; - } - else if ( this.vtyperef is Vala.DelegateType ) { - return ((Vala.DelegateType)this.vtyperef).delegate_symbol.name; - } - else if ( this.vtyperef is Vala.MethodType ) { - return ((Vala.MethodType)this.vtyperef).method_symbol.name; - } - else if ( this.vtyperef is Vala.SignalType ) { - return ((Vala.SignalType)this.vtyperef).signal_symbol.name; - } - else if ( this.vtyperef is Vala.ArrayType ) { - vdtype = ((Vala.ArrayType)this.vtyperef).element_type.data_type; - } - - if ( vdtype == null ) - vdtype = this.vtyperef.data_type; - - if ( vdtype == null ) { - return this.vtyperef.to_string(); - } - return vdtype.name; - */ - } - } - - private DataType? _get_data_type ( Vala.TypeSymbol vdtype, File file, Namespace ns ) { - if ( vdtype is Vala.Enum ) { - return ns.find_enum ( (Vala.Enum)vdtype ); - } - else if ( vdtype is ErrorDomain ) { - return ns.find_errordomain ( (Vala.ErrorDomain)vdtype ); - } - else if ( vdtype is Vala.Delegate ) { - return ns.find_delegate ( (Vala.Delegate)vdtype ); - } - else if ( vdtype is Vala.ArrayType ) { - var vtsym = ((Vala.ArrayType)vdtype).data_type; - return this._get_data_type ( vtsym, file, ns ); - } - else if ( vdtype is Vala.Class ) { - return ns.find_class ( (Vala.Class)vdtype ); - } - else if ( vdtype is Vala.Struct ) { - return ns.find_struct ( (Vala.Struct)vdtype ); - } - else if ( vdtype is Vala.Interface ) { - return ns.find_interface ( (Vala.Interface)vdtype ); - } - else if ( vdtype is Vala.PointerIndirection ) { - Vala.TypeSymbol vtsym = ((Vala.PointerType)vdtype).data_type; - return this._get_data_type ( vtsym, file, ns ); - } - return null; - } - - private File? get_file ( Vala.CodeNode vdtype ) { - if ( vdtype == null ) - return null; - - if ( vdtype.source_reference == null ) - return null; - - - Vala.SourceReference sref = vdtype.source_reference; - if ( sref is SourceReference == false ) - return null; - - Vala.SourceFile vfile = sref.file; - if ( vfile == null ) - return null; - - File file = this.head.find_file ( vfile ); - return file; - } - - private Namespace get_nspace ( File file, Vala.Symbol vns ) { - while ( vns is Vala.Namespace == false ) { - vns = vns.parent_symbol; - } - - Namespace ns = file.find_namespace ( (Vala.Namespace)vns ); - return ns; - } - - // internal - public void set_type_references ( ) { - //stdout.printf ( "> %s\n", this.vtyperef.to_string() ); - this.data_type = this.get_type_references ( this.vtyperef ); - } - - public DataType? get_type_references ( Vala.DataType vtyperef ) { - if ( vtyperef is Vala.ErrorType ) { - Vala.ErrorDomain verrdom = ((Vala.ErrorType)vtyperef).error_domain; - if ( verrdom != null ) { - File file = this.get_file ( verrdom ); - if ( file == null ) { - return glib_error; - } - - Namespace ns = this.get_nspace ( file, verrdom ); - Valadoc.ErrorDomain errdom = ns.find_errordomain ( (Vala.ErrorDomain)verrdom ); - return errdom; - } - } - - if ( vtyperef is Vala.ClassType ) { - Vala.Class vcl = ((Vala.ClassType)vtyperef).class_symbol; - File file = this.get_file ( vcl ); - if ( file == null ) - return null; // err - - Namespace ns = this.get_nspace ( file, vcl ); - Valadoc.Class cl = ns.find_class ( (Vala.Class)vcl ); - return cl; - } - - if ( vtyperef is Vala.InterfaceType ) { - Vala.Interface vif = ((Vala.InterfaceType)vtyperef).interface_symbol; - File file = this.get_file ( vif ); - if ( file == null ) - return null; // err - - Namespace ns = this.get_nspace ( file, vif ); - Valadoc.Interface iface = ns.find_interface ( (Vala.Interface)vif ); - return iface; - } - - if ( vtyperef is Vala.DelegateType ) { - Vala.Delegate vdel = ((Vala.DelegateType)vtyperef).delegate_symbol; - File file = this.get_file ( vdel ); - if ( file == null ) - return null; // err - - Namespace ns = this.get_nspace ( file, vdel ); - Valadoc.Delegate del = ns.find_delegate ( (Vala.Delegate)vdel ); - return del; - } - - if ( vtyperef is Vala.PointerType ) { - Vala.DataType vptr = ((Vala.PointerType)vtyperef).base_type; - if ( vptr == null ) - return null; - return this.get_type_references ( vptr ); - } - - if ( vtyperef is Vala.ArrayType ) { - Vala.DataType vptr = ((Vala.ArrayType)vtyperef).element_type; - if ( vptr == null ) - return null; - - return this.get_type_references ( vptr ); - } - /* - if ( vtyperef is Vala.ValueType ) { - // Integer, StructType, Enum - } */ - - Vala.TypeSymbol vdtype = vtyperef.data_type; - if ( vdtype == null ) { - return null; - } - - var varguments = vtyperef.get_type_arguments (); - this.set_template_argument_list ( varguments ); - - File file = this.get_file ( vdtype ); - if ( file == null ) - return null; // err - - Namespace ns = this.get_nspace ( file, vdtype ); - return this._get_data_type ( vdtype, file, ns ); - } - - public void write ( Langlet langlet, void* ptr ) { - langlet.write_type_reference ( this, ptr ); - } -} - - - -// TODO: Remove unused stuff -// You just need it for the name in a template-parameter-list. -// remove TypeHandler-interface -public class Valadoc.TypeParameter : Basic, TypeHandler { - public TypeParameter ( Valadoc.Settings settings, - Vala.TypeParameter vtypeparam, - Basic parent, - Tree head ) { - this.vtypeparam = vtypeparam; - this.settings = settings; - this.parent = parent; - this.head = head; - } - - public TypeReference type_reference { - protected set; - get; - } - - public void write ( Langlet langlet, void* ptr ) { - langlet.write_type_parameter ( this, ptr ); - } - - public Vala.TypeParameter vtypeparam { - construct set; - protected get; - } - - public string# datatype_name { - get { - return this.vtypeparam.name; - } - } - - // internal - public void initialisation ( ) { - } - - // internal - public void set_type_reference ( ) { - } -} - - -public class Valadoc.FormalParameter : Basic, TypeHandler { - public FormalParameter ( Valadoc.Settings settings, Vala.FormalParameter vformalparam, Basic parent, Tree head ) { - this.settings = settings; - this.vformalparam = vformalparam; - this.parent = parent; - this.head = head; - } - - public bool is_out { - get { - return this.vformalparam.direction == ParameterDirection.OUT; - } - } - - public bool is_ref { - get { - return this.vformalparam.direction == ParameterDirection.REF; - } - } - - public ExpressionType default_vaule_type { - default = ExpressionType.NOT_SET; - private set; - get; - } - - public string? default_value { - private set; - public get; - } - - // internal - public void initialisation ( ) { - this.vsymbol = this.vformalparam; - - var vformparam = this.vformalparam.parameter_type; - this.set_ret_type ( vformparam ); - - var def = this.vformalparam.default_expression; - if ( def != null ) { - { - if ( def is Vala.StringLiteral ) { - this.default_value = def.to_string; - this.default_vaule_type = ExpressionType.STRING; - } - else if ( def is Vala.CharacterLiteral ) { - this.default_value = def.to_string; - this.default_vaule_type = ExpressionType.CHAR; - } - else if ( def is Vala.RealLiteral ) { - this.default_vaule_type = ExpressionType.REAL; - this.default_value = def.to_string; - } - else if ( def is BooleanLiteral ) { - this.default_value = def.to_string; - this.default_vaule_type = ExpressionType.BOOL; - } - else if ( def is IntegerLiteral ) { - this.default_value = def.to_string; - this.default_vaule_type = ExpressionType.INT; - } - else if ( def is NullLiteral ) { - this.default_vaule_type = ExpressionType.NULL; - this.default_value = "null"; - } - else { - this.default_value = def.to_string; - } - } - } - } - - public TypeReference type_reference { - protected set; - get; - } - - public bool ellipsis { - get { - return this.vformalparam.ellipsis; - } - } - - public bool is_construct { - get { - return this.vformalparam.construct_parameter; - } - } - - public override string?# name { - get { - return ( this.vformalparam.name == null ) - ? "" : this.vformalparam.name; - } - } - - public Vala.FormalParameter vformalparam { - construct set; - protected get; - } - - // internal - public void set_type_references ( ) { - if ( this.vformalparam.ellipsis ) - return ; - - ((TypeHandler)this).set_type_references ( ); - } - - public void write ( Langlet langlet, void* ptr ) { - langlet.write_formal_parameter ( this, ptr ); - } -} - - - -public class Valadoc.PropertyAccessor : Object /*, FIXME: Valac-Bug! Can't override properties of SymbolAccessibility */ { - public PropertyAccessor ( Valadoc.Settings settings, Vala.PropertyAccessor vpropacc, Property parent, Tree head ) { - this.settings = settings; - this.vpropacc = vpropacc; - this.parent = parent; - this.head = head; - } - - public void construction ( ) { - } - - public Tree head { - construct; - get; - } - - public Vala.PropertyAccessor vpropacc { - construct; - private get; - } - - public Settings settings { - construct; - get; - } - - public Property parent { - private set; - get; - } - - public Tree tree { - construct; - get; - } - - public bool is_construct { - get { - return this.vpropacc.construction; - } - } - - public bool is_protected { - get { - return this.vpropacc.access == Vala.SymbolAccessibility.PROTECTED; - } - } - - public bool is_public { - get { - return this.vpropacc.access == Vala.SymbolAccessibility.PUBLIC; - } - } - - public bool is_private { - get { - return this.vpropacc.access == Vala.SymbolAccessibility.PRIVATE; - } - } - - public bool is_set { - get { - return this.vpropacc.writable; - } - } - - public bool is_get { - get { - return this.vpropacc.readable; - } - } - - public void write ( Langlet langlet, void* ptr ) { - langlet.write_property_accessor ( this, ptr ); - } -} - - - -public class Valadoc.Property : Basic, SymbolAccessibility, ReturnTypeHandler, Visitable, Writeable { - public Property ( Valadoc.Settings settings, - Vala.Property vproperty, - ContainerDataType parent, - Tree head, - uint bracket_level ) { - this.settings = settings; - this.vproperty = vproperty; - this.parent = parent; - this.head = head; - this.bracket_level = bracket_level; - } - - public string? get_cname () { - return this.vproperty.nick; - } - - public uint bracket_level { - construct set; - get; - } - - public bool equals ( Property p ) { - return this.vproperty.equals ( p.vproperty ); - } - - public TypeReference return_type { - protected set; - get; - } - - public bool is_virtual { - get { - return this.vproperty.is_virtual; - } - } - - public bool is_abstract { - get { - return this.vproperty.is_abstract; - } - } - - public bool is_override { - get { - return this.vproperty.overrides; - } - } - - public PropertyAccessor setter { - private set; - get; - } - - public PropertyAccessor getter { - private set; - get; - } - - // internal - public void initialisation ( ) { - this.vsymbol = vproperty; - - var ret = this.vproperty.property_type; - this.set_ret_type ( ret ); - - if ( this.vproperty.get_accessor != null ) - this.getter = new PropertyAccessor ( this.settings, this.vproperty.get_accessor, this, this.head ); - - if ( this.vproperty.set_accessor != null ) - this.setter = new PropertyAccessor ( this.settings, this.vproperty.set_accessor, this, this.head ); - } - - public Vala.Property vproperty { - construct set; - protected get; - } - - public override string?# name { - get { - return this.vproperty.name; - } - } - - // internal - public void set_type_references ( ) { - this.set_return_type_references ( ); - } - - // internal - public void parse_comment ( Valadoc.Parser docparser ) { - this.parse_comment_helper ( docparser, CommentContext.PROPERTY ); - } - - public void visit ( Doclet doclet ) { - if ( !this.is_visitor_accessible ( ) ) - return ; - - doclet.visit_property ( this ); - } - - public void write ( Langlet langlet, void* ptr ) { - langlet.write_property ( this, ptr ); - } -} - - - -public class Valadoc.Signal : Basic, ParameterListHandler, SymbolAccessibility, - ReturnTypeHandler, Visitable, Writeable -{ - public Signal ( Valadoc.Settings settings, - Vala.Signal vsignal, - ContainerDataType parent, - Tree head, - uint bracket_level ) { - this.settings = settings; - this.vsignal = vsignal; - this.parent = parent; - this.head = head; - this.bracket_level = bracket_level; - } - - construct { - this.param_list = new Gee.ArrayList (); - } - - public string? get_cname () { - return this.vsignal.get_cname(); - } - - public uint bracket_level { - construct set; - get; - } - - public TypeReference return_type { - protected set; - get; - } - - // internal - public void initialisation ( ) { - this.vsymbol = vsignal; - - var vparamlst = this.vsignal.get_parameters (); - this.add_parameter_list ( vparamlst ); - - var ret = this.vsignal.return_type; - this.set_ret_type ( ret ); - } - - protected Gee.ArrayList param_list { - protected set; - get; - } - - public Vala.Signal vsignal { - construct set; - private get; - } - - // internal - public void set_type_references ( ) { - this.set_parameter_list_type_references ( ); - this.set_return_type_references ( ); - } - - // internal - public void parse_comment ( Valadoc.Parser docparser ) { - this.parse_comment_helper ( docparser, CommentContext.SIGNAL ); - } - - public override string?# name { - get { - return this.vsignal.name; - } - } - - public void visit ( Doclet doclet ) { - if ( !this.is_visitor_accessible ( ) ) - return ; - - doclet.visit_signal ( this ); - } - - public void write ( Langlet langlet, void* ptr ) { - langlet.write_signal ( this, ptr ); - } -} - - - -public class Valadoc.Method : Basic, ParameterListHandler, ExceptionHandler, TemplateParameterListHandler, - SymbolAccessibility, ReturnTypeHandler, Visitable, Writeable -{ - public Method ( Valadoc.Settings settings, - Vala.Method vmethod, - MethodHandler parent, - Tree head, - uint bracket_level ) { - this.settings = settings; - this.vmethod = vmethod; - this.parent = parent; - this.head = head; - this.bracket_level = bracket_level; - } - - public string? get_cname () { - return this.vmethod.get_cname(); - } - - construct { - this.err_domains = new Gee.ArrayList(); - this.param_list = new Gee.ArrayList(); - this.template_param_lst = new Gee.ArrayList (); - } - - public Method base_method { - get; - set; - } - - public uint bracket_level { - construct set; - get; - } - - public TypeReference return_type { - protected set; - get; - } - - public Gee.ArrayList template_param_lst { - protected set; - get; - } - - public Gee.ArrayList param_list { - protected set; - get; - } - - public Gee.ArrayList err_domains { - protected set; - get; - } - - public string?# comment_str { - get { - return this.vmethod.source_reference.comment; - } - } - - // intern - public bool equals ( Method m ) { - return ( m.vmethod == this.vmethod ); - } - - // intern - public void parse_comment ( Valadoc.Parser docparser ) { - if ( this.documentation != null ) - return ; - - if ( this.comment_string == null ) - return ; - - bool tmp = Parser.is_documentation ( this.comment_string ); - if ( tmp == false ) - return ; - - if ( this.is_override && Parser.is_inherit_doc ( this.comment_string ) ) { - this.base_method.parse_comment ( docparser ); - this.documentation = this.base_method.documentation; - return ; - } - - // wrong context! - this.parse_comment_helper ( docparser, CommentContext.CLASS ); - } - - // internal - public void initialisation ( ) { - this.vsymbol = vmethod; - - var vret = this.vmethod.return_type; - this.set_ret_type ( vret ); - - var vparamlst = this.vmethod.get_parameters (); - this.add_parameter_list ( vparamlst ); - - var vexceptionlst = this.vmethod.get_error_types (); - this.add_error_domains ( vexceptionlst ); - } - - public Vala.Method vmethod { - construct set; - private get; - } - - public bool is_abstract { - get { - return this.vmethod.is_abstract; - } - } - - public bool is_virtual { - get { - return this.vmethod.is_virtual; - } - } - - public bool is_override { - get { - return this.vmethod.overrides; - } - } - - public bool is_static { - get { - if ( this.parent is Namespace || this.is_constructor ) - return false; - - return this.vmethod.binding == MemberBinding.STATIC; - } - } - - public string# parent_name { - get { - return this.parent.name; - } - } - - public bool is_global { - get { - return ( this.parent is Namespace ); - } - } - - public bool is_constructor { - get { - return ( this.vmethod is Vala.CreationMethod ); - } - } - - public bool is_inline { - get { - return this.vmethod.is_inline; - } - } - - public override string?# name { - get { - if ( this.is_constructor ) - return this.parent_name + this.vmethod.name.offset( ".new".len() ); - else - return this.vmethod.name; - } - } - - // internal - public void set_type_references ( ) { - this.set_return_type_references ( ); - - this.set_exception_type_references ( ); - this.set_parameter_list_type_references ( ); - } - - public void visit ( Doclet doclet, Valadoc.MethodHandler in_type ) { - if ( !this.is_visitor_accessible ( ) ) - return ; - - doclet.visit_method ( this, in_type ); - } - - public void write ( Langlet langlet, void* ptr, Valadoc.MethodHandler parent ) { - langlet.write_method ( ptr, this, parent ); - } -} - - -public class Valadoc.EnumValue: Basic, Writeable { - public EnumValue ( Valadoc.Settings settings, - Vala.EnumValue venval, - Enum parent, - Tree head ) { - this.settings = settings; - this.venval = venval; - this.parent = parent; - this.head = head; - } - - public void initialisation ( ) { - this.bracket_level = 1; - this.vsymbol = venval; - } - - public uint bracket_level { - construct set; - get; - } - - public override string?# name { - get { - return this.venval.name; - } - } - - public Vala.EnumValue venval { - construct set; - protected get; - } - - public void parse_comment ( Valadoc.Parser docparser ) { - this.parse_comment_helper ( docparser, CommentContext.ENUMVALUE ); - } - - public void write ( Langlet langlet, void* ptr ) { - langlet.write_enum_value ( this, ptr ); - } - - public void visit ( Doclet doclet ) { - doclet.visit_enum_value ( this ); - } -} - - - -public class Valadoc.ErrorCode : Basic, Writeable { - public ErrorCode ( Valadoc.Settings settings, - Vala.ErrorCode verrcode, - ErrorDomain parent, - Tree head ) { - this.settings = settings; - this.verrcode = verrcode; - this.parent = parent; - this.head = head; - } - - // internal - public void initialisation ( ) { - this.bracket_level = 1; - this.vsymbol = verrcode; - } - - public uint bracket_level { - construct set; - get; - } - - public override string?# name { - get { - return this.verrcode.name; - } - } - - public Vala.ErrorCode verrcode { - construct set; - protected get; - } - - public void write ( Langlet langlet, void* ptr ) { - langlet.write_error_code ( this, ptr ); - } - - public void parse_comment ( Valadoc.Parser docparser ) { - this.parse_comment_helper ( docparser, CommentContext.ENUMVALUE ); - } - - public void visit ( Doclet doclet ) { - doclet.visit_error_code ( this ); - } -} - - - -public abstract class Valadoc.DataType: Basic, SymbolAccessibility, Visitable, Writeable { - public override string?# name { - get { - return this.vsymbol.name; - } - } - - public uint bracket_level { - construct set; - get; - } - - // internal - public virtual void set_type_references ( ) { - } - - public virtual void visit ( Doclet doclet ) { - } - - public virtual void write ( Langlet langlet, void* ptr ) { - } -} - - - -public class Valadoc.Delegate : DataType, ParameterListHandler, SymbolAccessibility, Writeable, - ReturnTypeHandler, TemplateParameterListHandler, - ExceptionHandler { - public Delegate ( Valadoc.Settings settings, - Vala.Delegate vdelegate, - DelegateHandler parent, - Tree head, - uint bracket_level ) { - this.settings = settings; - this.vdelegate = vdelegate; - this.parent = parent; - this.head = head; - this.bracket_level = bracket_level; - } - - public string? get_cname () { - return this.vdelegate.get_cname(); - } - - construct { - this.err_domains = new Gee.ArrayList(); - this.param_list = new Gee.ArrayList (); - this.template_param_lst = new Gee.ArrayList (); - } - - public TypeReference return_type { - protected set; - get; - } - - public override void visit ( Doclet doclet ) { - if ( !this.is_visitor_accessible ( ) ) - return ; - - doclet.visit_delegate ( this ); - } - - public Gee.ArrayList template_param_lst { - protected set; - get; - } - - protected Gee.ArrayList param_list { - protected set; - get; - } - - protected Gee.ArrayList err_domains { - protected set; - get; - } - - // internal - public void initialisation ( ) { - this.vsymbol = this.vdelegate; - - var vparamlst = this.vdelegate.get_parameters (); - this.add_parameter_list ( vparamlst ); - - var vexceptionlst = this.vdelegate.get_error_types (); - this.add_error_domains ( vexceptionlst ); - - var ret = this.vdelegate.return_type; - this.set_ret_type ( ret ); - } - - public Vala.Delegate vdelegate { - construct set; - private get; - } - - public bool is_static { - get { - return this.vdelegate.has_target; - } - } - - // internal - public override void set_type_references ( ) { - this.set_template_parameter_list_references ( ); - this.set_parameter_list_type_references ( ); - this.set_return_type_references ( ); - } - - // internal - public void parse_comment ( Valadoc.Parser docparser ) { - this.parse_comment_helper ( docparser, CommentContext.DELEGATE ); - } - - // internal - public bool is_vdelegate ( Vala.Delegate vdel ) { - return ( this.vdelegate == vdel ); - } - - public override void write ( Langlet langlet, void* ptr ) { - langlet.write_delegate ( this, ptr ); - } -} - - - -public abstract class Valadoc.ContainerDataType : DataType, MethodHandler, Visitable, - TemplateParameterListHandler -{ - protected Gee.ArrayList parent_types = new Gee.ArrayList(); - - construct { - this.template_param_lst = new Gee.ArrayList (); - this.methods = new Gee.ArrayList (); - } - - protected Class? parent_class { - private set; - get; - } - - protected Gee.ArrayList methods { - set; - get; - } - - public string?# comment_str { - get { - return null; - } - } - - protected Gee.ArrayList template_param_lst { - set; - get; - } - - // rename to get_parent_type_list - public Gee.Collection get_parent_types ( ) { - return this.parent_types; - } - - public bool derived_from_interface ( Interface iface ) { - foreach ( DataType dtype in this.parent_types ) { - if ( dtype == iface ) - return true; - } - return false; - } - - // internal <>!<>!<>!<>!<> - // remove virtual - public virtual void parse_comments ( Valadoc.Parser docparser ) { - this.parse_method_comments ( docparser ); - } - - protected void set_parent_references ( Gee.Collection lst ) { - if ( ((Gee.Collection)this.parent_types).size != 0 ) - return ; - - foreach ( Vala.DataType vtyperef in lst ) { - var vtype = vtyperef.data_type; - if ( vtype == null ) - return ; - - Vala.SourceFile vfile = vtype.source_reference.file; - File file = this.head.find_file ( vfile ); - - Vala.Symbol vns = vtype; - while ( vns is Vala.Namespace == false ) { - vns = vns.parent_symbol; - } - - - Namespace ns = file.find_namespace ( (Vala.Namespace)vns ); - if ( vtype is Vala.Class ) { - var tmp = ns.find_vclass ( (Vala.Class)vtype ); - this.parent_types.add ( tmp ); - this.parent_class = tmp; - } - else if ( vtype is Vala.Interface ) { - var tmp = ns.find_interface ( (Vala.Interface)vtype ); - this.parent_types.add ( tmp ); - } - else if ( vtype is Vala.Struct ) { - var tmp = ns.find_struct ( (Vala.Struct)vtype ); - this.parent_types.add ( tmp ); - } - } - } - - // internal - public override void set_type_references ( ) { - this.set_template_parameter_list_references ( ); - this.set_method_type_references ( ); - base.set_type_references ( ); - } - - public bool is_double_method ( Method met ) { - foreach ( Method m2 in this.methods ) { - if ( met == m2 ) - continue; - - if ( met.name == m2.name ) - return true; - } - return false; - } -} - - - -public class Valadoc.Class : ContainerDataType, Visitable, ClassHandler, StructHandler, SignalHandler, - EnumHandler, PropertyHandler, ConstructionMethodHandler, FieldHandler, - DelegateHandler, ConstantHandler { - public Class ( Valadoc.Settings settings, Vala.Class vclass, ClassHandler parent, Tree head, uint bracket_level = 0 ) { - this.settings = settings; - this.vclass = vclass; - this.parent = parent; - this.head = head; - this.bracket_level = bracket_level; - } - - private bool inherited = false; - - protected Gee.ArrayList delegates { - private set; - get; - } - - protected Gee.ArrayList enums { - private set; - get; - } - - protected Gee.ArrayList fields { - set; - get; - } - - protected Gee.ArrayList construction_methods { - set; - get; - } - - protected Gee.ArrayList properties { - get; - set; - } - - protected Gee.ArrayList classes { - set; - get; - } - - protected Gee.ArrayList structs { - set; - get; - } - - protected Gee.ArrayList signals { - get; - set; - } - - protected Gee.ArrayList constants { - get; - set; - } - - public string? get_cname () { - return this.vclass.get_cname(); - } - - // internal - public override Basic? search_element ( string[] params, int pos ) { - if ( !(this.name == params[pos] || params[0] == "this") ) - return null; - - var fooo = string.joinv (".", params); - - if ( params[pos+1] == null ) - return this; - - var element = this.search_field ( params, pos ); - if ( element != null ) - return element; - - element = this.search_method ( params, pos ); - if ( element != null ) - return element; - - element = this.search_delegate ( params, pos ); - if ( element != null ) - return element; - - element = this.search_construction_method ( params, pos ); - if ( element != null ) - return element; - - element = this.search_signal ( params, pos ); - if ( element != null ) - return element; - - element = this.search_property ( params, pos ); - if ( element != null ) - return element; - - element = this.search_struct ( params, pos ); - if ( element != null ) - return element; - - element = this.search_class ( params, pos ); - if ( element != null ) - return element; - - element = this.search_enum ( params, pos ); - if ( element != null ) - return element; - - element = this.search_constant ( params, pos ); - if ( element != null ) - return element; - - return null; - } - - // internal - public void initialisation ( ) { - this.vsymbol = this.vclass; - - if ( this.full_name == "GLib.Error" ) { - glib_error = this; - } - - var vtparams = this.vclass.get_type_parameters (); - this.set_template_parameter_list ( vtparams ); - - Gee.Collection venums = this.vclass.get_enums (); - enums = new Gee.ArrayList (); - this.add_enums ( venums ); - - Gee.Collection vdelegates = this.vclass.get_delegates (); - delegates = new Gee.ArrayList (); - this.add_delegates ( vdelegates ); - - Gee.Collection vclasses = this.vclass.get_classes(); - this.classes = new Gee.ArrayList (); - this.add_classes ( vclasses ); - - Gee.Collection vstructs = this.vclass.get_structs(); - this.structs = new Gee.ArrayList (); - this.add_structs ( vstructs ); - - Gee.Collection vfields = this.vclass.get_fields(); - this.fields = new Gee.ArrayList (); - this.add_fields ( vfields ); - - Gee.Collection vmethods = this.vclass.get_methods (); - this.construction_methods = new Gee.ArrayList(); - this.add_methods_and_construction_methods ( vmethods ); - - Gee.Collection vsignals = this.vclass.get_signals(); - this.signals = new Gee.ArrayList(); - this.add_signals ( vsignals ); - - Gee.Collection vproperties = this.vclass.get_properties(); - this.properties = new Gee.ArrayList(); - this.add_properties ( vproperties ); - - Gee.Collection vconstants = this.vclass.get_constants(); - this.constants = new Gee.ArrayList(); - this.add_constants ( vconstants ); - } - - public string?# comment_str { - get { - return this.vclass.source_reference.comment; - } - } - - public Vala.Class vclass { - construct set; - private get; - } - - // internal - public bool is_vclass ( Vala.Class vcl ) { - return this.vclass == vcl; - } - - public override void write ( Langlet langlet, void* ptr ) { - langlet.write_class ( this, ptr ); - } - - public bool is_abstract { - get { - return this.vclass.is_abstract; - } - } - - // remove - public bool is_static { - get { - return this.vclass.is_static; - } - } - - public override void visit ( Doclet doclet ) { - if ( !this.is_visitor_accessible ( ) ) - return ; - - doclet.visit_class ( this ); - } - - // internal - public override void parse_comments ( Valadoc.Parser docparser ) { - this.parse_comment_helper ( docparser, CommentContext.CLASS ); - - this.parse_construction_method_comments ( docparser ); - this.parse_delegate_comments ( docparser ); - this.parse_constant_comments ( docparser ); - this.parse_property_comments ( docparser ); - this.parse_struct_comments ( docparser ); - this.parse_signal_comments ( docparser ); - this.parse_class_comments ( docparser ); - this.parse_field_comments ( docparser ); - this.parse_enum_comments ( docparser ); - base.parse_comments ( docparser ); - } - - // remove ? - protected bool is_double_field ( Field f ) { - foreach ( Field f2 in this.fields ) { - if ( f == f2 ) - continue ; - - if ( f.name == f2.name ) - return true; - } - return false; - } - - // internal - public override void set_type_references ( ) { - base.set_type_references ( ); - - var lst = this.vclass.get_base_types (); - this.set_parent_references ( lst ); - - this.set_construction_method_references ( ); - this.set_constant_type_references ( ); - this.set_delegate_type_references ( ); - this.set_property_type_reference ( ); - this.set_signal_type_references ( ); - this.set_field_type_references ( ); - this.set_enum_type_references ( ); - this.set_struct_type_references ( ); - this.set_class_type_references ( ); - } - - private void inheritance_class ( Class dtype ) { - dtype.inheritance ( ); - - if ( dtype.name == "Object" ) - return ; - - var flst = dtype.get_field_list ( ); - foreach ( Field f in flst ) { - this.fields.add ( f ); - } - - var plst = dtype.get_property_list ( ); - foreach ( Property prop in plst ) { - this.properties.add ( prop ); - } - - var proplst = dtype.get_property_list ( ); - foreach ( Property p in proplst ) { - if ( p.is_private ) - continue ; - - if ( p.is_override ) { - if ( this.is_overwritten_property ( p ) ) - continue ; - } - - this.properties.add ( p ); - } - - var mlst = dtype.get_method_list ( ); - foreach ( Method m in mlst ) { - if ( m.is_private ) - continue ; - - if ( m.is_virtual || m.is_override || m.is_abstract ) { - Method m2 = get_new_method ( m ); - if ( m2 != null ) - m2.base_method = m; - continue ; - } - - this.methods.add ( m ); - } - } - - private Method? get_new_method ( Method overwritten_method ) { - foreach ( Method m in this.methods ) { - if ( !m.is_override ) - continue ; - - if ( m.name == overwritten_method.name ) - return m; - } - return null; - } - - private void inheritance_interface ( Interface dtype ) { - /*if ( dtype.derived_from_interface ( dtype ) ) - return ; */ - - var plst = dtype.get_property_list ( ); - foreach ( Property p in plst ) { - if ( p.is_private ) - continue ; - - if ( p.is_abstract ) - continue ; - - this.properties.add ( p ); - } - - var mlst = dtype.get_method_list ( ); - foreach ( Method m in mlst ) { - if ( m.is_private ) - continue ; - - if ( m.is_abstract ) - continue ; - - this.methods.add ( m ); - } - - var slst = dtype.get_signal_list ( ); - foreach ( Signal sig in slst ) { - if ( sig.is_private ) - continue ; - - this.signals.add ( sig ); - } - } - - // internal - public void inheritance ( ) { - if ( inherited == true ) - return ; - - inherited = true; - foreach ( DataType dtype in this.parent_types ) { - if ( dtype is Class ) - this.inheritance_class ( (Class)dtype ); - else if ( dtype is Interface ) - this.inheritance_interface ( (Interface)dtype ); - } - - foreach ( Class cl in this.classes ) { - cl.inheritance( ); - } - } -} - - - -public class Valadoc.ErrorDomain : DataType, MethodHandler, Visitable { - public ErrorDomain ( Valadoc.Settings settings, - Vala.ErrorDomain verrdom, - ErrorDomoainHandler parent, - Tree head ) { - this.settings = settings; - this.verrdom = verrdom; - this.parent = parent; - this.head = head; - } - - public string? get_cname () { - return this.verrdom.get_cname(); - } - - private Gee.ArrayList errcodes = new Gee.ArrayList (); - - protected Vala.ErrorDomain verrdom { - private get; - set; - } - - protected Gee.ArrayList methods { - protected set; - get; - } - - // internal - public bool is_verrordomain ( Vala.ErrorDomain ver ) { - return ( this.verrdom == ver ); - } - - //inline - private inline Basic? search_error_code ( string[] params, int pos ) { - pos++; - - if ( params[pos+1] != null ) - return null; - - foreach ( ErrorCode errcode in this.errcodes ) { - if ( errcode.name == params[pos] ) - return errcode; - } - return null; - } - - // internal - public override Basic? search_element ( string[] params, int pos ) { - if ( this.name != params[pos] ) - return null; - - if ( params[pos+1] == null ) - return this; - - var element = this.search_method ( params, pos ); - if ( element != null ) - return element; - - element = this.search_error_code ( params, pos ); - if ( element != null ) - return element; - - return null; - } - - // internal - public void parse_comments ( Valadoc.Parser docparser ) { - // CommentContext.ENUM - this.parse_comment_helper ( docparser, CommentContext.ERRORDOMAIN ); - this.parse_method_comments ( docparser ); - - foreach ( ErrorCode errcode in this.errcodes ) { - errcode.parse_comment ( docparser ); - } - } - - public void visit_error_codes ( Doclet doclet ) { - foreach ( ErrorCode errcode in this.errcodes ) - errcode.visit ( doclet ); - } - - public Gee.ReadOnlyCollection get_error_code_list ( ) { - return new Gee.ReadOnlyCollection ( this.errcodes ); - } - - public void visit ( Doclet doclet ) { - if ( !this.is_visitor_accessible ( ) ) - return ; - - doclet.visit_error_domain ( this ); - } - - public override void write ( Langlet langlet, void* ptr ) { - langlet.write_error_domain ( this, ptr ); - } - - private inline void append_error_code ( Gee.Collection verrcodes ) { - foreach ( Vala.ErrorCode verrcode in verrcodes ) { - var tmp = new ErrorCode ( this.settings, verrcode, this, this.head ); - tmp.initialisation ( ); - this.errcodes.add ( tmp ); - } - } - - // internal - public override void set_type_references ( ) { - this.set_method_type_references ( ); - } - - // internal - public void initialisation ( ) { - this.vsymbol = this.verrdom; - - Gee.Collection vmethods = this.verrdom.get_methods (); - this.methods = new Gee.ArrayList (); - this.add_methods ( vmethods ); - - Gee.Collection verrcodes = this.verrdom.get_codes (); - this.append_error_code ( verrcodes ); - } -} - - - -public class Valadoc.Enum : DataType, MethodHandler, Visitable { - public Enum ( Valadoc.Settings settings, - Vala.Enum venum, - EnumHandler parent, - Tree head ) { - this.settings = settings; - this.venum = venum; - this.parent = parent; - this.head = head; - } - - public string? get_cname () { - return this.venum.get_cname(); - } - - private inline Basic? search_enum_value ( string[] params, int pos ) { - pos++; - - if ( params[pos+1] != null ) - return null; - - foreach ( EnumValue enval in this.en_values ) { - if ( enval.name == params[pos] ) - return enval; - } - return null; - } - - // internal - public override Basic? search_element ( string[] params, int pos ) { - if ( this.name != params[pos] ) - return null; - - if ( params[pos+1] == null ) - return this; - - - var element = this.search_method ( params, pos ); - if ( element != null ) - return element; - - element = this.search_enum_value ( params, pos ); - if ( element != null ) - return element; - - return null; - } - - // internal - public override void set_type_references ( ) { - this.set_method_type_references ( ); - } - - construct { - this.en_values = new Gee.ArrayList (); - this.methods = new Gee.ArrayList (); - } - - protected Gee.ArrayList methods { - protected set; - get; - } - - protected Gee.ArrayList en_values { - get; - set; - } - - public Gee.ReadOnlyCollection get_enum_values () { - return new Gee.ReadOnlyCollection( this.en_values ); - } - - // internal - public void parse_comments ( Valadoc.Parser docparser ) { - // CommentContext.ENUM - this.parse_comment_helper ( docparser, CommentContext.ENUM ); - - foreach ( EnumValue enval in this.en_values ) { - enval.parse_comment ( docparser ); - } - - this.parse_method_comments ( docparser ); - } - - private inline void add_enum_values ( Gee.Collection venvals ) { - foreach ( Vala.EnumValue venval in venvals ) { - var tmp = new EnumValue ( this.settings, venval, this, this.head ); - tmp.initialisation ( ); - this.en_values.add ( tmp ); - } - } - - // internal - public void initialisation ( ) { - this.vsymbol = this.venum; - - Gee.Collection vmethods = this.venum.get_methods (); - this.add_methods ( vmethods ); - - Gee.Collection venvals = this.venum.get_values (); - this.add_enum_values ( venvals ); - } - - public void visit_enum_values ( Doclet doclet ) { - foreach ( EnumValue enval in this.en_values ) - enval.visit ( doclet ); - } - - public override void visit ( Doclet doclet ) { - if ( !this.is_visitor_accessible ( ) ) - return ; - - doclet.visit_enum ( this ); - } - - public Vala.Enum venum { - construct set; - private get; - } - - // internal - public bool is_venum ( Vala.Enum ven ) { - return ( this.venum == ven ); - } - - public override void write ( Langlet langlet, void* ptr ) { - langlet.write_enum ( this, ptr ); - } -} - - - -public class Valadoc.Struct : ContainerDataType, Visitable, ConstructionMethodHandler, FieldHandler, ConstantHandler { - public Struct ( Valadoc.Settings settings, Vala.Struct vstruct, StructHandler parent, Tree head, uint bracket_level ) { - this.settings = settings; - this.vstruct = vstruct; - this.parent = parent; - this.head = head; - this.bracket_level = bracket_level; - } - - public string? get_cname () { - return this.vstruct.get_cname(); - } - - protected Gee.ArrayList fields { - set; - get; - } - - protected Gee.ArrayList construction_methods { - set; - get; - } - - protected Gee.ArrayList constants { - set; - get; - } - - // internal - public override Basic? search_element ( string[] params, int pos ) { - if ( this.name != params[pos] ) - return null; - - if ( params[pos+1] == null ) - return this; - - var element = this.search_field ( params, pos ); - if ( element != null ) - return element; - - element = this.search_method ( params, pos ); - if ( element != null ) - return element; - - element = this.search_constant ( params, pos ); - if ( element != null ) - return element; - - return this.search_construction_method ( params, pos ); - } - - // internal - public void initialisation ( ) { - this.vsymbol = this.vstruct; - - var vtparams = this.vstruct.get_type_parameters (); - this.set_template_parameter_list ( vtparams ); - - Gee.Collection vfields = this.vstruct.get_fields(); - this.fields = new Gee.ArrayList (); - this.add_fields ( vfields ); - - Gee.Collection vconstants = this.vstruct.get_constants(); - this.constants = new Gee.ArrayList (); - this.add_constants ( vconstants ); - - Gee.Collection vmethods = this.vstruct.get_methods (); - this.construction_methods = new Gee.ArrayList(); - this.add_methods_and_construction_methods ( vmethods ); - } - - public string?# comment_str { - get { - return this.vstruct.source_reference.comment; - } - } - - public Vala.Struct vstruct { - construct set; - private get; - } - - // internal - public bool is_vstruct ( Vala.Struct vstru ) { - return ( this.vstruct == vstru ); - } - - public override void visit ( Doclet doclet ) { - if ( !this.is_visitor_accessible ( ) ) - return ; - - doclet.visit_struct ( this ); - } - - public override void write ( Langlet langlet, void* ptr ) { - langlet.write_struct ( this, ptr ); - } - - // internal - public override void parse_comments ( Valadoc.Parser docparser ) { - this.parse_comment_helper ( docparser, CommentContext.STRUCT ); - this.parse_construction_method_comments ( docparser ); - this.parse_constant_comments ( docparser ); - this.parse_field_comments ( docparser ); - base.parse_comments ( docparser ); - } - - // internal - public override void set_type_references ( ) { - this.set_construction_method_references ( ); - this.set_constant_type_references ( ); - this.set_field_type_references ( ); - base.set_type_references ( ); - - var lst = this.vstruct.get_base_types (); - this.set_parent_references ( lst ); - } -} - - - -public class Valadoc.Interface : ContainerDataType, Visitable, SignalHandler, PropertyHandler, FieldHandler, - DelegateHandler, EnumHandler, StructHandler, ClassHandler { - public Interface ( Valadoc.Settings settings, Vala.Interface vinterface, InterfaceHandler parent, Tree head ) { - this.settings = settings; - this.vinterface = vinterface; - this.parent = parent; - this.head = head; - } - - public string? get_cname () { - return this.vinterface.get_cname(); - } - - protected Gee.ArrayList properties { - get; - set; - } - - protected Gee.ArrayList fields { - get; - set; - } - - protected Gee.ArrayList signals { - get; - set; - } - - protected Gee.ArrayList enums { - get; - set; - } - - protected Gee.ArrayList delegates { - get; - set; - } - - protected Gee.ArrayList structs { - get; - set; - } - - protected Gee.ArrayList classes { - get; - set; - } - - public Vala.Interface vinterface { - construct set; - protected get; - } - - // internal - public override Basic? search_element ( string[] params, int pos ) { - if ( !(this.name == params[pos] || params[0] == "this") ) - return null; - - if ( params[pos+1] == null ) - return this; - - var element = this.search_field ( params, pos ); - if ( element != null ) - return element; - - element = this.search_method ( params, pos ); - if ( element != null ) - return element; - - element = this.search_signal ( params, pos ); - if ( element != null ) - return element; - - element = this.search_property ( params, pos ); - if ( element != null ) - return element; - - element = this.search_delegate ( params, pos ); - if ( element != null ) - return element; - - element = this.search_struct ( params, pos ); - if ( element != null ) - return element; - - element = this.search_enum ( params, pos ); - if ( element != null ) - return element; - - element = this.search_class ( params, pos ); - if ( element != null ) - return element; - - return null; - } - - // internal - public void initialisation ( ) { - this.vsymbol = this.vinterface; - - var vtparams = this.vinterface.get_type_parameters (); - this.set_template_parameter_list ( vtparams ); - - Gee.Collection methods = this.vinterface.get_methods (); - this.methods = new Gee.ArrayList(); - this.add_methods ( methods ); - - Gee.Collection delegates = this.vinterface.get_delegates (); - this.delegates = new Gee.ArrayList(); - this.add_delegates ( delegates ); - - Gee.Collection signals = this.vinterface.get_signals(); - this.signals = new Gee.ArrayList(); - this.add_signals ( signals ); - - Gee.Collection properties = this.vinterface.get_properties(); - this.properties = new Gee.ArrayList(); - this.add_properties ( properties ); - - Gee.Collection fields = this.vinterface.get_fields(); - this.fields = new Gee.ArrayList(); - this.add_fields ( fields ); - - Gee.Collection structs = this.vinterface.get_structs(); - this.structs = new Gee.ArrayList(); - this.add_structs ( structs ); - - Gee.Collection classes = this.vinterface.get_classes(); - this.classes = new Gee.ArrayList(); - this.add_classes ( classes ); - - Gee.Collection enums = this.vinterface.get_enums(); - this.enums = new Gee.ArrayList(); - this.add_enums ( enums ); - } - - public bool is_static { - get { - return this.vinterface.is_static; - } - } - - public string?# comment_str { - get { - return this.vinterface.source_reference.comment; - } - } - - // internal - public bool is_vinterface ( Vala.Interface viface ) { - return ( this.vinterface == viface ); - } - - public override void visit ( Doclet doclet ) { - if ( !this.is_visitor_accessible ( ) ) - return ; - - doclet.visit_interface ( this ); - } - - public override void write ( Langlet langlet, void* ptr ) { - langlet.write_interface ( this, ptr ); - } - - // internal - public override void parse_comments ( Valadoc.Parser docparser ) { - this.parse_comment_helper ( docparser, CommentContext.INTERFACE ); - this.parse_delegate_comments ( docparser ); - this.parse_property_comments ( docparser ); - this.parse_signal_comments ( docparser ); - this.parse_struct_comments ( docparser ); - this.parse_field_comments ( docparser ); - this.parse_class_comments ( docparser ); - this.parse_enum_comments ( docparser ); - base.parse_comments ( docparser ); - } - - // internal - public override void set_type_references ( ) { - base.set_type_references ( ); - - this.set_delegate_type_references (); - this.set_property_type_reference (); - this.set_signal_type_references (); - this.set_struct_type_references (); - this.set_field_type_references (); - this.set_enum_type_references (); - this.set_class_type_references (); - - var lst = this.vinterface.get_prerequisites ( ); - this.set_parent_references ( lst ); - } -} - - - - -public class Valadoc.Namespace : Basic, MethodHandler, FieldHandler, NamespaceHandler, ErrorDomoainHandler, - EnumHandler, ClassHandler, StructHandler, Writeable, InterfaceHandler, - DelegateHandler, ConstantHandler -{ - protected Gee.ArrayList constants { - protected set; - get; - } - - protected Gee.ArrayList enums { - private set; - get; - } - - protected Gee.ArrayList interfaces { - private set; - get; - } - - protected Gee.ArrayList delegates { - private set; - get; - } - - protected Gee.ArrayList errdoms { - private set; - get; - } - - public void initialisation( ) { - this.namespaces = new Gee.ArrayList (); - this.structs = new Gee.ArrayList(); - this.classes = new Gee.ArrayList(); - this.bracket_level = 0; - - this.constants = new Gee.ArrayList (); - this.interfaces = new Gee.ArrayList(); - this.methods = new Gee.ArrayList (); - this.delegates = new Gee.ArrayList(); - this.errdoms = new Gee.ArrayList(); - this.enums = new Gee.ArrayList(); - this.fields = new Gee.ArrayList (); - - /* - Gee.Collection vdelegates = this.vnspace.get_delegates (); - this.delegates = new Gee.ArrayList(); - this.add_delegates ( vdelegates ); - - Gee.Collection verrdoms = this.vnspace.get_error_types (); - this.errdoms = new Gee.ArrayList(); - this.add_error_domains ( verrdoms ); - - Gee.Collection venums = this.vnspace.get_enums (); - this.enums = new Gee.ArrayList(); - this.add_enums ( venums ); - - Gee.Collection vfields = this.vnspace.get_fields (); - this.fields = new Gee.ArrayList (); - this.add_fields ( vfields ); - - Gee.Collection vmethods = this.vnspace.get_methods (); - this.methods = new Gee.ArrayList (); - this.add_methods ( vmethods ); - - Gee.Collection vifaces = this.vnspace.get_interfaces (); - this.interfaces = new Gee.ArrayList(); - this.add_interfaces ( vifaces ); - */ - } - - public Gee.ArrayList namespaces { - private set; - get; - } - - protected Gee.ArrayList classes { - private set; - get; - } - - protected Gee.ArrayList structs { - private set; - get; - } - - private inline Basic? search_namespace ( string[] params, int pos ) { - foreach ( Namespace ns in this.namespaces ) { - Basic element = ns.search_element ( params, pos+1 ); - if ( element != null ) - return element; - } - return null; - } - - // internal - public override Basic? search_element ( string[] params, int pos ) { - if ( this.name != params[pos] ) - return null; - - if ( params[pos+1] == null ) - return this; - - - Basic element = this.search_namespace ( params, pos ); - if ( element != null ) - return element; - - element = this.search_class ( params, pos ); - if ( element != null ) - return element; - - element = this.search_interface ( params, pos ); - if ( element != null ) - return element; - - element = this.search_struct ( params, pos ); - if ( element != null ) - return element; - - element = this.search_enum ( params, pos ); - if ( element != null ) - return element; - - element = this.search_error_domain ( params, pos ); - if ( element != null ) - return element; - - element = this.search_method ( params, pos ); - if ( element != null ) - return element; - - element = this.search_field ( params, pos ); - if ( element != null ) - return element; - - element = this.search_delegate ( params, pos ); - if ( element != null ) - return element; - - element = search_constant ( params, pos ); - if ( element != null ) - return element; - - return null; - } - - public uint bracket_level { - construct set; - get; - } - - protected Gee.ArrayList fields { - set; - get; - } - - protected Gee.ArrayList methods { - set; - get; - } - - // internal, remove - public Struct? find_struct ( Vala.Struct vstruct ) { - foreach ( Struct stru in this.structs ) { - if ( stru.is_vstruct( vstruct ) ) - return stru; - } - - return null; - } - - // internal, remove - public Class? find_class ( Vala.Class vclass ) { - foreach ( Class cl in this.classes ) { - if ( cl.is_vclass( vclass ) ) - return cl; - } - - return null; - } - - public Namespace ( Valadoc.Settings settings, - Vala.Namespace vnspace, - NamespaceHandler parent, - Tree head ) { - this.settings = settings; - this.vnspace = vnspace; - this.parent = parent; - this.head = head; - } - - public void visit ( Doclet doclet ) { - doclet.visit_namespace ( this ); - } - - public Vala.Namespace vnspace { - construct set; - private get; - } - - public override string?# name { - get { - return this.vnspace.name; - } - } - - /*/ internal - public void append_interface ( Vala.Interface viface ) { - var tmp = new Interface ( this.settings, viface, this, this.head ); - tmp.initialisation ( ); - this.interfaces.add ( tmp ); - } */ - - /*/ internal - private Valadoc.Class create_subclasses ( Vala.Class vcl, Basic parent, - Gee.HashMap > sub_classes, - Gee.HashMap > sub_structs, - uint rank ) - { - var cl = new Class ( this.settings, vcl, (ClassHandler)parent, this.head, rank++ ); - cl.initialisation( ); - - foreach ( Vala.Struct vsubstruct in sub_structs.get( vcl ) ) { - var substru = new Struct ( this.settings, vsubstruct, cl, this.head, rank ); - substru.initialisation( ); - cl.append_struct ( substru ); - } - - foreach ( Vala.Class vsubcl in sub_classes.get ( vcl ) ) { - var subcl = this.create_subclasses ( vsubcl, cl,sub_classes, sub_structs, rank ); - cl.append_class ( subcl ); - } - return cl; - } -*/ -/* - // internal - public void append_global_class ( Vala.Class vclass, - Gee.HashMap > vsubclasses, - Gee.HashMap > vsubstructs ) - { - var tmp = this.create_subclasses ( vclass, this, vsubclasses, vsubstructs, 0 ); - this.append_class ( tmp ); - } - - // internal - public void append_global_struct ( Vala.Struct vstruct ) { - var tmp = new Struct ( this.settings, vstruct, this, this.head, 0 ); - tmp.initialisation ( ); - this.append_struct ( tmp ); - } -*/ - /*/ internal - public void append_enum ( Vala.Enum venum ) { - var tmp = new Enum ( this.settings, venum, this, this.head ); - tmp.initialisation ( ); - this.enums.add( tmp ); - }*/ - - /*/ internal - public void append_error_domain ( Vala.ErrorDomain verrdom ) { - var tmp = new ErrorDomain ( this.settings, verrdom, this, this.head ); - tmp.initialisation ( ); - this.errdoms.add ( tmp ); - } */ - - /*/ internal - public void append_global_method ( Vala.Method vm ) { - var tmp = new Method ( this.settings, vm, this, this.head, 0 ); - tmp.initialisation ( ); - this.methods.add ( tmp ); - }*/ - - /*/ internal - public void append_global_field ( Vala.Field vf ) { - var tmp = new Field ( this.settings, vf, this, this.head, 0 ); - tmp.initialisation ( ); - this.fields.add( tmp ); - } -*/ - /*/ internal - public void append_delegate ( Vala.Delegate vdel ) { - var tmp = new Delegate ( this.settings, vdel, this, this.head, 0 ); - tmp.initialisation ( ); - this.delegates.add ( tmp ); - } */ - - // interface - public void set_type_references ( ) { - this.set_errordomain_type_referenes ( ); - this.set_namespace_type_references ( ); - this.set_interface_type_references ( ); - this.set_delegate_type_references ( ); - this.set_constant_type_references ( ); - this.set_method_type_references ( ); - this.set_field_type_references ( ); - this.set_struct_type_references ( ); - this.set_class_type_references ( ); - } - - // internal - public void inheritance ( ) { - this.namespace_inheritance ( ); - - foreach ( Class cl in this.classes ) { - cl.inheritance ( ); - } - } - - // internal - public void parse_comments ( Valadoc.Parser docparser ) { - this.parse_enum_comments ( docparser ); - this.parse_field_comments ( docparser ); - this.parse_class_comments ( docparser ); - this.parse_method_comments ( docparser ); - this.parse_struct_comments ( docparser ); - this.parse_constant_comments ( docparser ); - this.parse_delegate_comments ( docparser ); - this.parse_interface_comments ( docparser ); - this.parse_namespace_comments ( docparser ); - this.parse_errordomain_comments ( docparser ); - } - - // internal - public bool is_vnspace ( Vala.Namespace vns ) { - return ( this.vnspace == vns ); - } - - public void write ( Langlet langlet, void* ptr ) { - langlet.write_namespace ( this, ptr ); - } -} - - -// rename to package -public class Valadoc.File : Basic, NamespaceHandler { - public Gee.ArrayList namespaces { - default = new Gee.ArrayList(); - private set; - private get; - } - - public File ( Valadoc.Settings settings, Vala.SourceFile vfile, Tree head ) { - this.settings = settings; - this.vfile = vfile; - this.head = head; - } - - public override string?# name { - get { - return this.vfile.filename; - } - } - - public Vala.SourceFile vfile { - construct set; - private get; - } - - // internal - public override Basic? search_element ( string[] params, int pos ) { - foreach ( Namespace ns in this.namespaces ) { - Basic element = ns.search_element( params, pos ); - if ( element != null ) - return element; - } - return null; - } - - // internal - public bool is_file ( Vala.SourceFile vfile ) { - return ( vfile == this.vfile ); - } - - public void visit ( Doclet doclet ) { - if ( !settings.to_doc ( this.name ) ) - return ; - - doclet.visit_file ( this ); - } - - /*/ internal - public void append_interface ( Vala.Interface viface ) { - var ns = this.get_namespace ( viface ); - ns.append_interface ( viface ); - } - */ -/* - // internal - public void append_class ( Vala.Class vclass, - Gee.HashMap< Gee.Collection > vsubclasses, - Gee.HashMap< Gee.Collection > vsubstructs ) { - var ns = this.get_namespace ( vclass ); - ns.append_global_class ( vclass, vsubclasses, vsubstructs ); - } - - // internal - public void append_struct ( Vala.Struct vstruct ) { - var ns = this.get_namespace ( vstruct ); - ns.append_global_struct ( vstruct ); - } - - // internal - public void append_enum ( Vala.Enum venum ) { - var ns = this.get_namespace ( venum ); - ns.append_enum ( venum ); - }*/ - - /*/ internal - public void append_error_domain ( Vala.ErrorDomain verrdom ) { - var ns = this.get_namespace ( verrdom ); - ns.append_error_domain ( verrdom ); - } */ - - /*/ internal - public void append_global_method ( Vala.Method vm ){ - var ns = this.get_namespace ( vm ); - ns.append_global_method ( vm ); - } */ - - - /*/ internal - public void append_global_field ( Vala.Field vf ) { - var ns = this.get_namespace ( vf ); - ns.append_global_field( vf ); - }*/ - - /* internal - public void append_delegate ( Vala.Delegate vdel ) { - var ns = this.get_namespace ( vdel ); - ns.append_delegate ( vdel ); - } */ - - // internal - public void inheritance ( ) { - this.namespace_inheritance ( ); - } - - // internal - public void parse_comments ( Valadoc.Parser docparser ) { - this.parse_namespace_comments ( docparser ); - } - - // internal - public void set_type_references ( ) { - this.set_namespace_type_references ( ); - } - - public void write ( Langlet langlet, void* ptr ) { - langlet.write_file ( this, ptr ); - } -} - - - -public class Valadoc.Tree : Vala.CodeVisitor { - private Gee.ArrayList files = new Gee.ArrayList(); - - // remove - private uint level = 0; - - // remove - private Vala.TypeSymbol current_type = null; - - // remove - private Gee.HashMap > sub_classes - = new Gee.HashMap > (); - - // remove - private Gee.HashMap > sub_structs - = new Gee.HashMap > (); - - - public Valadoc.Settings settings { - construct set; - private get; - } - - public Tree (Valadoc.Settings settings, Vala.CodeContext context ) { - this.settings = settings; - this.context = context; - } - - public CodeContext context { - construct set; - private get; - } - - public void visit ( Doclet doclet ) { - foreach ( File file in this.files ) { - file.visit ( doclet ); - } - } - - private Basic? search_symbol_in_namespace ( Basic element, string[] params ) { - return this.search_symbol_in_symbol ( element.nspace, params ); - } - - private Basic? search_symbol_in_type ( Basic element, string[] params, int params_offset = 0 ) { - if ( !( element.parent is ContainerDataType || element.parent is Enum || element.parent is ErrorDomain ) ) - return null; - - if ( params[0] != "this" ) { - string[] nparams = new string[ params.length+1 ]; - nparams[0] = "this"; - for ( int i = 0; params.length > i ; i++ ) { - nparams [i+1] = params[i]; - } - return this.search_symbol_in_symbol ( element.parent, nparams, 0 ); - } - - return this.search_symbol_in_symbol ( element.parent, params, 0 ); - } - - private Basic? search_symbol_in_symbol ( Basic element, string[] params, int params_offset = 0 ) { - if ( element is Class || element is Interface || element is Struct ) { - return element.search_element ( params, params_offset ); - } - else if ( element is Enum ) { - return element.search_element ( params, params_offset ); - } - else if ( element is ErrorDomain ) { - return element.search_element ( params, params_offset ); - } - return null; - } - - private Basic? search_symbol_in_global_namespaces ( Basic? element, string[] params ) { - int param_size = 0; - for ( param_size = 0; params[param_size] != null; param_size++ ); - - string[] global_params = new string [ param_size +1]; - - global_params[0] = null; - for ( int i = 0; params[i-1] != null ; i++ ) { - global_params[i+1] = params[i]; - } - - foreach ( File f in this.files ) { - Basic element = f.search_element ( global_params, 0 ); - if ( element != null ) - return element; - } - return null; - } - - private Basic? search_symbol_in_namespaces ( Basic element, string[] params ) { - foreach ( File f in this.files ) { - Basic element = f.search_element ( params, 0 ); - if ( element != null ) - return element; - } - return null; - } - - private Basic? search_element ( Basic? element, string[] params ) { - if ( element != null ) { - if ( params[0] == "this" ) { - return search_symbol_in_type ( element, params, 1 ); - } - - var tmp = search_symbol_in_type ( element, params ); - if ( tmp != null ) - return tmp; - } - - var tmp = search_symbol_in_global_namespaces ( element, params ); - if ( tmp != null ) - return tmp; - - if ( element != null ) { - var tmp = this.search_symbol_in_namespaces ( element, params ); - if ( tmp != null ) - return tmp; - } - return null; - } - - public Basic? search_symbol_str ( Valadoc.Basic? element, string symname ) { - string[] params = symname.split( ".", -1 ); - int i = 0; while ( params[i] != null ) i++; - params.length = i; - - return this.search_element ( element, params ); - } - - public override void visit_namespace ( Vala.Namespace vns ) { - vns.accept_children ( this ); - } - - public override void visit_class ( Vala.Class vcl ) { - if ( vcl.parent_symbol is Vala.Namespace == false ) - return ; - - Vala.SourceFile vfile = vcl.source_reference.file; - File file = this.get_file ( vfile ); - Namespace ns = file.get_namespace ( vcl ); - ns.add_class ( vcl ); - } - - public override void visit_interface ( Vala.Interface viface ) { - if ( viface.parent_symbol is Vala.Namespace == false ) - return ; - - Vala.SourceFile vfile = viface.source_reference.file; - File file = this.get_file ( vfile ); - Namespace ns = file.get_namespace ( viface ); - ns.add_interface ( viface ); - } - - public override void visit_struct ( Vala.Struct vstru ) { - if ( vstru.parent_symbol is Vala.Namespace == false ) - return ; - - Vala.SourceFile vfile = vstru.source_reference.file; - File file = this.get_file ( vfile ); - Namespace ns = file.get_namespace ( vstru ); - ns.add_struct ( vstru ); - } - - public override void visit_field ( Vala.Field vf ) { - if ( vf.parent_symbol is Vala.Namespace == false ) - return ; - - Vala.SourceFile vfile = vf.source_reference.file; - File file = this.get_file ( vfile ); - Namespace ns = file.get_namespace ( vf ); - ns.add_field ( vf ); - } - - public override void visit_method ( Vala.Method vm ) { - if ( vm.parent_symbol is Vala.Namespace == false ) - return ; - - Vala.SourceFile vfile = vm.source_reference.file; - File file = this.get_file ( vfile ); - Namespace ns = file.get_namespace ( vm ); - ns.add_method ( vm ); - } - - public override void visit_delegate ( Vala.Delegate vd ) { - if ( vd.parent_symbol is Vala.Namespace == false ) - return ; - - Vala.SourceFile vfile = vd.source_reference.file; - File file = this.get_file ( vfile ); - Namespace ns = file.get_namespace ( vd ); - ns.add_delegate ( vd ); - } - - public override void visit_enum ( Vala.Enum venum ) { - if ( venum.parent_symbol is Vala.Namespace == false ) - return ; - - Vala.SourceFile vfile = venum.source_reference.file; - File file = this.get_file ( vfile ); - Namespace ns = file.get_namespace ( venum ); - ns.add_enum ( venum ); - } - - public override void visit_constant ( Vala.Constant vc ) { - if ( vc.parent_symbol is Vala.Namespace == false ) - return ; - - Vala.SourceFile vfile = vc.source_reference.file; - File file = this.get_file ( vfile ); - Namespace ns = file.get_namespace ( vc ); - ns.add_constant ( vc ); - } - - public override void visit_error_domain ( Vala.ErrorDomain verrdom ) { - if ( verrdom.parent_symbol is Vala.Namespace == false ) - return ; - - Vala.SourceFile vfile = verrdom.source_reference.file; - File file = this.get_file ( vfile ); - Namespace ns = file.get_namespace ( verrdom ); - ns.add_error_domain ( verrdom ); - } - -/* - public override void visit_field ( Vala.Field vf ) { - if ( this.level > 0 ) - return ; - - Vala.SourceReference vsrcref = vf.source_reference; - Vala.SourceFile vsrc = vsrcref.file; - - File file = get_file ( vsrc ); - file.append_global_field ( vf ); - } - - public override void visit_method ( Vala.Method vm ) { - if ( this.level > 0 ) - return ; - - Vala.SourceReference vsrcref = vm.source_reference; - Vala.SourceFile vsrc = vsrcref.file; - - File file = get_file ( vsrc ); - file.append_global_method ( vm ); - } -* - public override void visit_struct ( Vala.Struct vstruct ) { - this.level++; - - if ( this.level == 1 ) { - Vala.SourceReference vsrcref = vstruct.source_reference; - Vala.SourceFile vsrc = vsrcref.file; - - File file = get_file ( vsrc ); - file.append_struct ( vstruct ); - } - else { - // is it really a class in our case? - Gee.ArrayList vstrulist = this.sub_structs.get ( (Vala.Class)this.current_type ); - vstrulist.add ( vstruct ); - } - - this.level--; - } - - public override void visit_class ( Vala.Class vcl ) { - Vala.TypeSymbol parent_type = this.current_type; - this.current_type = vcl; - this.level++; - - var vcllist = new Gee.ArrayList (); - this.sub_classes.set ( vcl, vcllist ); - - var vstrulist = new Gee.ArrayList (); - this.sub_structs.set ( vcl, vstrulist ); - - vcl.accept_children ( this ); - - if ( this.level == 1 ) { - Vala.SourceReference vsrcref = vcl.source_reference; - Vala.SourceFile vsrc = vsrcref.file; - - File file = get_file ( vsrc ); - file.append_class ( vcl, this.sub_classes, this.sub_structs ); - this.sub_classes.clear (); - this.sub_structs.clear (); - } - else { - // Really a class? - Gee.ArrayList vcllist = this.sub_classes.get ( (Vala.Class)parent_type ); - vcllist.add ( vcl ); - } - - this.current_type = parent_type; - this.level--; - } -*/ -/* - public override void visit_delegate ( Vala.Delegate vdel ) { - Vala.SourceReference vsrcref = vdel.source_reference; - Vala.SourceFile vsrc = vsrcref.file; - - File file = get_file ( vsrc ); - file.append_delegate ( vdel ); - } - - public override void visit_error_domain ( Vala.ErrorDomain verrdom ) { - Vala.SourceReference vsrcref = verrdom.source_reference; - Vala.SourceFile vsrc = vsrcref.file; - File file = get_file ( vsrc ); - - file.append_error_domain ( verrdom ); - } - - public override void visit_enum ( Vala.Enum ven ) { - Vala.SourceReference vsrcref = ven.source_reference; - Vala.SourceFile vsrc = vsrcref.file; - File file = get_file ( vsrc ); - - file.append_enum ( ven ); - } -*/ - - public void create_tree ( ) { - this.context.accept( this ); - this.set_type_references ( ); - this.inheritance ( ); // remove - } - - // internal - public File? find_file ( Vala.SourceFile vfile ) { - foreach ( File f in this.files ) { - if ( f.is_file( vfile ) ) - return f; - } - return null; - } - - private void set_type_references ( ) { - foreach ( File f in this.files ) { - f.set_type_references( ); - } - } - - private void inheritance ( ) { - foreach ( File f in this.files ) { - f.inheritance( ); - } - } - - public void parse_comments ( Valadoc.Parser docparser ) { - foreach ( File f in this.files ) { - f.parse_comments( docparser ); - } - } - - // internal - public File get_file ( Vala.SourceFile vfile ) { - File file = this.find_file( vfile ); - if ( file != null ) - return file; - - var tmp = new File ( this.settings,vfile, this ); - this.files.add ( tmp ); - return tmp; - } -} - - diff --git a/src/libvaladoc/parser.vala b/src/libvaladoc/parser.vala index c43ce28b5..d59da0eaf 100644 --- a/src/libvaladoc/parser.vala +++ b/src/libvaladoc/parser.vala @@ -1762,11 +1762,6 @@ public class Parser { } } - private bool check_image_path ( int startpos, GLib.StringBuilder buf ) { - //this.error ( "invalid image path", startpos-this.pos ); - return true; - } - private ImageDocElementPosition parse_image_position () { int separatorpos = this.pos; @@ -1804,12 +1799,12 @@ public class Parser { imgpos = parse_image_position (); if ( str[pos+1] == '}' ) { - bool tmp = check_image_path ( startpos+2, buf ); - if ( tmp == true ) { - ImageDocElement img = (ImageDocElement)GLib.Object.new ( this.modules.imgtag ); - img.parse ( this.settings, tree, me, buf.str, imgpos ); - elements.add ( img ); + ImageDocElement img = (ImageDocElement)GLib.Object.new ( this.modules.imgtag ); + bool tmp = img.parse ( this.settings, tree, me, buf.str, imgpos ); + if ( tmp == false ) { + this.error ( "image not found.", startpos-this.pos ); } + elements.add ( img ); pos++; return ; } @@ -1917,7 +1912,7 @@ public class Parser { } if ( this.str[this.pos+1] == ']' ) { - bool tmp = check_image_path ( startpos, buf ); + bool tmp = check_link_path ( startpos, buf ); if ( tmp == true && linkstat == true ) { LinkDocElement linktag = (LinkDocElement)GLib.Object.new ( this.modules.linktag ); linktag.parse ( this.settings, tree, me, buf.str, txt ); diff --git a/src/valadoc/valadoc.vala b/src/valadoc/valadoc.vala index abb4741d7..5f462be71 100755 --- a/src/valadoc/valadoc.vala +++ b/src/valadoc/valadoc.vala @@ -255,7 +255,7 @@ public class ValaDoc : Object { if ( pluginpath == null ) { - pluginpath = Config.plugin_dir + "/template/"; + pluginpath = Config.plugin_dir + "/html/"; } else { if ( !pluginpath.has_suffix ( "/" ) ) diff --git a/src/vapi/mysql.vapi b/src/vapi/mysql.vapi deleted file mode 100644 index 23614dc11..000000000 --- a/src/vapi/mysql.vapi +++ /dev/null @@ -1,108 +0,0 @@ -/* mysql.vala - * - * Copyright (C) 2008 Jukka-Pekka Iivonen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Author: - * Jukka-Pekka Iivonen - */ - -[CCode (lower_case_cprefix = "mysql_", cheader_filename = "mysql/mysql.h")] -namespace Mysql { - /* Database Connection Handle */ - [Compact] - [CCode (free_function = "mysql_close", cname = "MYSQL", cprefix = "mysql_")] - public class Database { - [CCode (argument0 = "NULL", cname = "mysql_init")] - public void init (); - - public ulong affected_rows (); - public bool autocommit (bool mode); - public bool change_user (string username, string passwd, string dbname); - public weak string character_set_name (); - public bool commit (); - public int dump_debug_info (); - public uint errno (); - public weak string error (); - public weak string get_host_info (); - public uint get_proto_info (); - public weak string get_server_info (); - public ulong get_server_version (); - public weak string get_ssl_cipher (); - public weak string info (); - public ulong insert_id (); - public int kill (ulong pid); - public Result list_dbs (string wild); - public Result list_fields (string table, string wild); - public Result list_processes (); - public Result list_tables (string wild); - public bool more_results (); - public int next_result (); - public int options (int option, string arg); - public int ping (); - public int query (string stmt_str); - public bool real_connect (string host, string username, string passwd, string dbname, uint port, string? unix_socket, ulong client_flag); - public ulong real_escape_string (string to, string from, ulong length); - public int real_query (string query, ulong len); - public int reload (); - public bool rollback (); - public int select_db (string dbname); - public int set_character_set (string csname); - public void set_local_infile_default (); - public int set_server_option (int option); - public weak string sqlstate (); - public int shutdown (int shutdown_level); - public bool ssl_set (string key, string cert, string ca, string capath, string cipher); - public weak string stat (); - public Result? store_result (); - public ulong thread_id (); - public Result use_result (); - public uint warning_count (); - } - [Compact] - [CCode (free_function = "mysql_free_result", cname = "MYSQL_RES", cprefix = "mysql_")] - public class Result { - public bool eof (); - public Field fetch_field (); - public Field fetch_field_direct (uint field_nbr); - public Field[] fetch_fields (); - public ulong[] fetch_lengths (); - [CCode(array_length=false)] - [NoArrayLength] - public weak string[]? fetch_row (); - public uint fetch_count (); - public uint num_fields (); - public uint num_rows (); - - public bool data_seek (ulong offset); - } - [CCode (cname = "MYSQL_FIELD")] - public struct Field { - } - - public weak string get_client_info (); - public ulong get_client_version (); - public void debug (string msg); - public ulong hex_string (string to, string from, ulong length); - public void library_end (); - public int library_init (int argc, string[] argv, string[] groups); - public void server_end (); - public int server_init (int argc, string[] argv, string[] groups); - public void thread_end (); - public bool thread_init (); - public uint thread_safe (); -} -