Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2016-02-09 06:00:13 +0300
committerMiguel de Icaza <miguel@gnome.org>2016-02-09 06:00:13 +0300
commitb2b2db1b458b4617bf8557eeea8eefa334df0888 (patch)
tree9bb89e4e577dc6b0caa5c747352fd930e1926a4b /docs
parent41262dbad663f0f1c65f1f34ecef5a3f5e941efe (diff)
[Docs] Use an external style sheet, prefix the css classes with mapi to isolate, fix various processing problems
Diffstat (limited to 'docs')
-rw-r--r--docs/api-style.css71
-rw-r--r--docs/exdoc242
-rw-r--r--docs/sources/mono-api-assembly.html2
-rw-r--r--docs/sources/mono-api-domains.html2
-rw-r--r--docs/sources/mono-api-exc.html2
-rw-r--r--docs/sources/mono-api-gc.html2
-rw-r--r--docs/sources/mono-api-gchandle.html2
-rw-r--r--docs/sources/mono-api-image.html2
-rw-r--r--docs/sources/mono-api-jit.html2
-rw-r--r--docs/sources/mono-api-methods.html2
-rw-r--r--docs/sources/mono-api-object.html2
-rw-r--r--docs/sources/mono-api-string.html2
-rw-r--r--docs/sources/mono-api-type.html2
13 files changed, 90 insertions, 245 deletions
diff --git a/docs/api-style.css b/docs/api-style.css
index a7c0c54b27a..001df1b4c73 100644
--- a/docs/api-style.css
+++ b/docs/api-style.css
@@ -1,9 +1,9 @@
- body {
+ .mapi-docs {
line-height: 1.5;
padding-left: 2em;
padding-right: 2em;
}
- body code {
+ .mapi-description code {
font-family: "Consolas", "Courier", monospace;
border: 1px solid rgba(214,214,214,1);
background-color: rgba(249,249,249,1);
@@ -11,14 +11,20 @@
padding-right: 3px;
}
- .api-entry code {
+ .mapi-header {
+ padding: 0 0 5pt 5pt;
+ margin: 10pt;
+ white-space: pre;
+ font-family: monospace;
+ border: 1px solid rgba(233,233,233,1);
+ }
+
+ .mapi-entry code {
border: none;
background-color: transparent;
}
- h3 {
- }
- .api-parameters {
+ .mapi-parameters {
border-collapse: collapse;
border-spacing: 0;
empty-cells: hide;
@@ -26,17 +32,17 @@
margin: 5px 0 26px;
}
- .api-parameters td {
+ .mapi-parameters td {
border: 1px solid rgba(214,214,214,1);
border-left-style: none;
padding: 5px 25px 5px 10px;
}
- .api-parameters tr>td:last-child {
+ .mapi-parameters tr>td:last-child {
border-right: 0;
}
- .api-parameters td:first-of-type {
+ .mapi-parameters td:first-of-type {
text-align: right;
padding: 7px;
vertical-align: top;
@@ -44,15 +50,15 @@
width: 40px;
}
- .api-parameters tr:last-child>td {
+ .mapi-parameters tr:last-child>td {
border-bottom: 0;
}
- .api-parameters tr:first-child>td {
+ .mapi-parameters tr:first-child>td {
border-top: 0;
}
- .api-parameters tr td:first-of-type {
+ .mapi-parameters tr td:first-of-type {
text-align: right;
padding: 7px;
vertical-align: top;
@@ -60,7 +66,7 @@
width: 40px;
}
- .api {
+ .mapi {
left: -25px;
margin: 0;
padding: 13px 25px 0;
@@ -68,7 +74,7 @@
width: 100%;
}
- .api-description {
+ .mapi-description {
background: rgba(249,249,249,1);
border-bottom: 1px solid rgba(233,233,233,1);
left: -25px;
@@ -78,14 +84,14 @@
width: 100%;
}
- .api-entry {
+ .mapi-entry {
background: transparent;
}
- .api-docs {
+ .mapi-docs {
}
- .prototype {
+ .mapi-prototype {
border-left: 5px solid rgba(205,233,244,1);
padding: .5em;
margin-top: 5pt;
@@ -96,42 +102,26 @@
background-color: #f9f9f9;
}
- .header {
- padding: 0 0 5pt 5pt;
- margin: 10pt;
- white-space: pre;
- font-family: monospace;
- border: 1px solid rgba(233,233,233,1);
- }
-
- .code {
- border: 1px solid;
- padding: 0 0 5pt 5pt;
- margin: 10pt;
- white-space: pre;
- font-family: monospace;
- }
-
- .declaration {
+ .mapi-declaration {
margin-top: 21px;
}
- .api-section {
+ .mapi-section {
font-size: smaller;
font-weight: bold;
margin-top: 21px;
line-height: 1.5;
}
- .strike {
+ .mapi-strike {
text-decoration: line-through;
}
- .deprecated {
+ .mapi-deprecated {
color: red;
}
- .api-ptr-container {
+ .mapi-ptr-container {
background: white;
border-bottom: 1px solid rgba(233,233,233,1);
left: -25px;
@@ -142,7 +132,7 @@
width: 100%;
}
- .api-ptr {
+ .mapi-ptr {
background: rgba(249,249,249,1);
border-left: 1px solid rgba(233,233,233,1);
border-top: 1px solid rgba(233,233,233,1);
@@ -157,9 +147,10 @@
width: 12px;
}
- .api-height-container {
+ .mapi-height-container {
left: -25px;
padding: 0 25px;
position: relative;
width: 100%;
}
+
diff --git a/docs/exdoc b/docs/exdoc
index 7ee86e7d771..7ce4b9290cc 100644
--- a/docs/exdoc
+++ b/docs/exdoc
@@ -7,6 +7,10 @@ if ($ARGV[0] eq "-h"){
shift @ARGV;
shift @ARGV;
}
+open (FILE, "$dir/api-style.css" || die "Did not find $dir/api-style.css");
+while (<FILE>){
+ $css = $css . $_;
+}
if ($ARGV[0] eq "-t"){
$dir = $ARGV[1];
@@ -51,176 +55,11 @@ if ($html){
<head>
<title>$name</title>
<style type="text/css">
- body {
- line-height: 1.5;
- padding-left: 2em;
- padding-right: 2em;
- }
- body code {
- font-family: "Consolas", "Courier", monospace;
- border: 1px solid rgba(214,214,214,1);
- background-color: rgba(249,249,249,1);
- padding-left: 3px;
- padding-right: 3px;
- }
-
- .api-entry code {
- border: none;
- background-color: transparent;
- }
- h3 {
- }
-
- .api-parameters {
- border-collapse: collapse;
- border-spacing: 0;
- empty-cells: hide;
- border: 0;
- margin: 5px 0 26px;
- }
-
- .api-parameters td {
- border: 1px solid rgba(214,214,214,1);
- border-left-style: none;
- padding: 5px 25px 5px 10px;
- }
-
- .api-parameters tr>td:last-child {
- border-right: 0;
- }
-
- .api-parameters td:first-of-type {
- text-align: right;
- padding: 7px;
- vertical-align: top;
- word-break: normal;
- width: 40px;
- }
-
- .api-parameters tr:last-child>td {
- border-bottom: 0;
- }
-
- .api-parameters tr:first-child>td {
- border-top: 0;
- }
-
- .api-parameters tr td:first-of-type {
- text-align: right;
- padding: 7px;
- vertical-align: top;
- word-break: normal;
- width: 40px;
- }
-
- .api {
- left: -25px;
- margin: 0;
- padding: 13px 25px 0;
- position: relative;
- width: 100%;
- }
-
- .api-description {
- background: rgba(249,249,249,1);
- border-bottom: 1px solid rgba(233,233,233,1);
- left: -25px;
- margin: 0;
- padding: 13px 25px 0;
- position: relative;
- width: 100%;
- }
-
- .api-entry {
- background: transparent;
- }
-
- .api-docs {
- }
-
- .prototype {
- border-left: 5px solid rgba(205,233,244,1);
- padding: .5em;
- margin-top: 5pt;
- margin-bottom: 5pt;
- font-family: "Consolas", "Courier", monospace;
- display: block;
- overflow: auto;
- background-color: #f9f9f9;
- }
-
- .header {
- padding: 0 0 5pt 5pt;
- margin: 10pt;
- white-space: pre;
- font-family: monospace;
- border: 1px solid rgba(233,233,233,1);
- }
-
- .code {
- border: 1px solid;
- padding: 0 0 5pt 5pt;
- margin: 10pt;
- white-space: pre;
- font-family: monospace;
- }
-
- .declaration {
- margin-top: 21px;
- }
-
- .api-section {
- font-size: smaller;
- font-weight: bold;
- margin-top: 21px;
- line-height: 1.5;
- }
-
- .strike {
- text-decoration: line-through;
- }
-
- .deprecated {
- color: red;
- }
-
- .api-ptr-container {
- background: white;
- border-bottom: 1px solid rgba(233,233,233,1);
- left: -25px;
- padding-left: 25px;
- padding-right: 25px;
- padding-bottom: 13px;
- position: relative;
- width: 100%;
- }
-
- .api-ptr {
- background: rgba(249,249,249,1);
- border-left: 1px solid rgba(233,233,233,1);
- border-top: 1px solid rgba(233,233,233,1);
- height: 12px;
- left: 37px;
- top: -7px;
- -webkit-transform: rotate(45deg);
- -moz-transform: rotate(45deg);
- -o-transform: rotate(45deg);
- transform: rotate(45deg);
- position: absolute;
- width: 12px;
- }
-
- .api-height-container {
- left: -25px;
- padding: 0 25px;
- position: relative;
- width: 100%;
- }
-
+$css
</style>
</head>
<body>
-<div class="api-docs">
+<div class="mapi-docs">
EOF
@a = split (/\n/, $files_content[$f]);
$strikeextra = "";
@@ -230,10 +69,10 @@ EOF
($api,$caption) = $line =~ /<h4><a name=\"api:(\w+)\">(\w+)<\/a><\/h4>/;
if ($api ne ""){
if ($api_shown == 1){
- print OUT "</div> <!-- class=api -->\n\n";
+ print OUT "</div> <!-- class=mapi -->\n\n";
if ($deprecated{$api}){
- $strike = "strike";
- $strikeextra = "</div><br><div class='deprecated'><b>Deprecated:</b> " . $deprecated{$api};
+ $strike = "mapi-strike";
+ $strikeextra = "</div><br><div class='mapi-deprecated'><b>Deprecated:</b> " . $deprecated{$api};
} else {
$strike = "";
$strikeextra = "";
@@ -242,32 +81,31 @@ EOF
$api_shown = 1;
$proto = $prototype{$api};
if ($proto eq ""){
- $proto = "Prototype: $api";
+ $proto = "$api";
}
print OUT<<EOF;
<a name="api:$api"></a>
-<div class="api">
- <div class="api-entry $strike"><code>$api$strikeextra</code></div>
- <div class="api-height-container">
- <div class="api-ptr-container"></div>
- <div class="api-description">
- <div class="api-ptr"></div>
-
- <div class="declaration api-section">Syntax</div>
- <div class="prototype">$proto</div>
+<div class="mapi">
+ <div class="mapi-entry $strike"><code>$api$strikeextra</code></div>
+ <div class="mapi-height-container">
+ <div class="mapi-ptr-container"></div>
+ <div class="mapi-description">
+ <div class="mapi-ptr"></div>
+
+ <div class="mapi-declaration mapi-section">Syntax</div>
+ <div class="mapi-prototype">$proto</div>
<p>
EOF
-
-# if ($arguments{$api} ne "" && (!($arguments{$api}) =~ /^[ \t]+$/)){
- print OUT " <div class=\"api-section\">Parameters</div>\n";
- print OUT " <table class=\"api-parameters\"><tbody>".${arguments{$api}}."</tbody></table>";
-# }
-# &opt_print ("Parameters", $arguments{$api}, 1);
+ $ppars = $arguments{$api};
+ if ($ppars ne "" && (!($ppars =~ /^[ \t]+$/))){
+ print OUT " <div class=\"mapi-section\">Parameters</div>\n";
+ print OUT " <table class=\"mapi-parameters\"><tbody>".${arguments{$api}}."</tbody></table>";
+ }
- &opt_print ("Returns", $returns{$api}, 1);
+ &opt_print ("Return value", $returns{$api}, 0);
&opt_print ("Description", $bodies{$api}, 0);
- print OUT " </div><!--api-description-->\n </div><!--height container-->\n";
+ print OUT " </div><!--mapi-description-->\n </div><!--height container-->\n";
} else {
if ($line =~ /@API_IDX@/){
$apis_toc = &create_toc ($apis[$f]);
@@ -290,13 +128,30 @@ EOF
close OUT;
system ("$ENV{runtimedir}/mono-wrapper convert.exe $dir/html/$name $dir/html/x-$name");
+
# clean up the mess that AgilityPack does, it CDATAs our CSS
open HACK, "$dir/html/x-$name" || die "Could not open $dir/html/x-$name";
open HACKOUT, ">$dir/deploy/$name" || die "Could not open output";
+ $line = 0;
while (<HACK>){
+ $line++;
s/^\/\/<!\[CDATA\[//;
s/^\/\/\]\]>\/\///;
+
+ # Remove the junk <span> wrapper generated by AgilityPack
+ if ($line==1){
+ s/<?span>//;
+ }
+ if (/<style type/){
+ # Replace the CSS in the XHTML output with the original CSS
+ print HACKOUT $_;
+ print HACKOUT $css;
+ while (<HACK>){
+ last if (/<\/style>/);
+ }
+ }
+
print HACKOUT $_;
}
#system ("cp.exe $dir/html/$name $dir/deploy/$name");
@@ -411,6 +266,9 @@ sub create_toc {
chop;
$p = $prototype{$line};
($ret, $xname, $args) = $p =~ /(.*)\n(\w+)[ \t](.*)/;
+ if ($xname eq ""){
+ $xname = $line;
+ }
$rspace = " " x ($type_size - length ($ret));
$nspace = " " x ($name_size - length ($xname));
@@ -454,11 +312,7 @@ sub opt_print {
my ($caption, $opttext, $quote) = @_;
if ($opttext ne "" && (!($opttext =~ /^[ \t]+$/))){
- print OUT " <div class=\"api-section\">$caption</div>\n";
- if ($quote == 1){
- print OUT " <blockquote>$opttext</blockquote>\n";
- } else {
- print OUT " <p>$opttext\n";
- }
+ print OUT " <div class=\"mapi-section\">$caption</div>\n";
+ print OUT " <div>$opttext</div>\n";
}
}
diff --git a/docs/sources/mono-api-assembly.html b/docs/sources/mono-api-assembly.html
index 15e29583999..979a74c5246 100644
--- a/docs/sources/mono-api-assembly.html
+++ b/docs/sources/mono-api-assembly.html
@@ -2,7 +2,7 @@
<h3>Synopsis</h3>
- <div class="header">
+ <div class="mapi-header">
#include &lt;metadata/assembly.h&gt;
typedef struct _MonoImage MonoImage;
diff --git a/docs/sources/mono-api-domains.html b/docs/sources/mono-api-domains.html
index 9ae0bd14497..ceef8893bf5 100644
--- a/docs/sources/mono-api-domains.html
+++ b/docs/sources/mono-api-domains.html
@@ -2,7 +2,7 @@
<h3>Synopsis</h3>
-<div class="header">
+<div class="mapi-header">
#include &lt;metadata/appdomain.h&gt;
/* Managed AppDomain */
diff --git a/docs/sources/mono-api-exc.html b/docs/sources/mono-api-exc.html
index d0ab2032fd1..f6504355ebc 100644
--- a/docs/sources/mono-api-exc.html
+++ b/docs/sources/mono-api-exc.html
@@ -1,6 +1,6 @@
<h2>Exception Handling</h2>
-<div class="header">
+<div class="mapi-header">
@API_IDX@
</div>
diff --git a/docs/sources/mono-api-gc.html b/docs/sources/mono-api-gc.html
index e70e821be8a..20d6cb9dc9b 100644
--- a/docs/sources/mono-api-gc.html
+++ b/docs/sources/mono-api-gc.html
@@ -61,7 +61,7 @@
bridged objects are not nulled. This might be considered a
bug.
-<div class="header">
+<div class="mapi-header">
enum {
SGEN_BRIDGE_VERSION = 4
};
diff --git a/docs/sources/mono-api-gchandle.html b/docs/sources/mono-api-gchandle.html
index e07be50b594..ccd468823fb 100644
--- a/docs/sources/mono-api-gchandle.html
+++ b/docs/sources/mono-api-gchandle.html
@@ -2,7 +2,7 @@
<h3>Synopsys</h3>
- <div class="header">
+ <div class="mapi-header">
@API_IDX@
</div>
diff --git a/docs/sources/mono-api-image.html b/docs/sources/mono-api-image.html
index f0640ce9dce..764f2a4a9c9 100644
--- a/docs/sources/mono-api-image.html
+++ b/docs/sources/mono-api-image.html
@@ -6,7 +6,7 @@
<h3>Synopsis</h3>
- <div class="header">
+ <div class="mapi-header">
#include &lt;metadata/image.h&gt;
typedef struct _MonoImage MonoImage;
diff --git a/docs/sources/mono-api-jit.html b/docs/sources/mono-api-jit.html
index 14548c4e9d3..ee9836cd116 100644
--- a/docs/sources/mono-api-jit.html
+++ b/docs/sources/mono-api-jit.html
@@ -1,6 +1,6 @@
<h2>Synopsis</h2>
-<div class="header">
+<div class="mapi-header">
@API_IDX@
</div>
diff --git a/docs/sources/mono-api-methods.html b/docs/sources/mono-api-methods.html
index ae12de2fbb5..bd3e04759e9 100644
--- a/docs/sources/mono-api-methods.html
+++ b/docs/sources/mono-api-methods.html
@@ -14,7 +14,7 @@
managed implementation of System.Version, creating an instance
of the object, and then invoking the constructor on it.
- <div class="header">
+ <div class="mapi-header">
MonoObject*
create_version (MonoDomain *domain, guint32 major, guint32 minor, guint32 build, guint32 revision)
{
diff --git a/docs/sources/mono-api-object.html b/docs/sources/mono-api-object.html
index da421e45743..92e8963dbf3 100644
--- a/docs/sources/mono-api-object.html
+++ b/docs/sources/mono-api-object.html
@@ -16,7 +16,7 @@
<h2>Synopsis</h2>
-<div class="header">
+<div class="mapi-header">
#include &lt;metadata/object.h&gt;
typedef struct MonoVTable MonoVTable;
diff --git a/docs/sources/mono-api-string.html b/docs/sources/mono-api-string.html
index f5956dd51b8..be70faf606a 100644
--- a/docs/sources/mono-api-string.html
+++ b/docs/sources/mono-api-string.html
@@ -4,7 +4,7 @@
<h3>Synopsis</h3>
- <div class="header">
+ <div class="mapi-header">
#include &lt;metadata/object.h&gt;
typedef struct {
diff --git a/docs/sources/mono-api-type.html b/docs/sources/mono-api-type.html
index a5a98c99c75..1fa9feee332 100644
--- a/docs/sources/mono-api-type.html
+++ b/docs/sources/mono-api-type.html
@@ -2,7 +2,7 @@
<h3>Synopsis</h3>
- <div class="header">
+ <div class="mapi-header">
#include &lt;metadata/metadata.h&gt;
#include &lt;metadata/class.h&gt;