[docs] Improve the rendering of our API binding APIs and runtime API documentation
authorMiguel de Icaza <miguel@gnome.org>
Mon, 8 Feb 2016 18:56:51 +0000 (13:56 -0500)
committerMiguel de Icaza <miguel@gnome.org>
Mon, 8 Feb 2016 20:02:07 +0000 (15:02 -0500)
15 files changed:
docs/exdoc
docs/sources/mono-api-assembly.html
docs/sources/mono-api-domains.html
docs/sources/mono-api-embedding.html
docs/sources/mono-api-jit.html
mono/metadata/appdomain.c
mono/metadata/assembly.c
mono/metadata/boehm-gc.c
mono/metadata/class.c
mono/metadata/gc.c
mono/metadata/metadata.c
mono/metadata/runtime.c
mono/metadata/sgen-mono.c
mono/metadata/threads.c
mono/metadata/verify.c

index ce35052443e77a1a28b1205906b12cd0e116a8b3..a1ce4378b6f86675d111d9ef00abb2974ada7dba 100644 (file)
@@ -49,64 +49,179 @@ if ($html){
 <?xml version="1.0" encoding="utf-8"?>
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-   <title>$name</title>
-   <style type="text/css">
-   h3 { 
-       font-size: 18px;
-       padding-bottom: 4pt;
-       border-bottom: 2px solid #dddddd;
-   }
-       
+    <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 {
-     padding: 10pt;
-     margin: 10pt;
-     border: 3px solid #ddd;
-   } 
-
-   .api-entry { 
-       border-bottom: none;
-       font-size: 150%;
-       font-family: "Consolas", "Courier", monospace;
-       padding-bottom: .5em;
-   }
-
-   .prototype {
-     border: 3px solid #ecf0f1;
-     border-radius: 6px;
-     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;
-   }
+        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;
-   }
-
-   .strike {
-      text-decoration: line-through;
-   }
-       .deprecated {
-           color: red;
-       }
+    .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 {
+        height: 0;
+        left: -25px;
+        padding: 0 25px;
+        position: relative;
+        width: 100%;
+    }
+       
    </style>
 </head>
 <body>
+<div class="api-docs">
 EOF
        @a = split (/\n/, $files_content[$f]);
        $strikeextra = "";
@@ -131,32 +246,45 @@ EOF
                    $proto = "Prototype: $api";
                }
 
-print OUT<<EOF;
+                print OUT<<EOF;
  <a name="api:$api"></a>
  <div class="api">
-    <div class="api-entry $strike">$api$strikeextra</div>
-    <div><b>Syntax</b></div>
-    <div class="prototype">$proto</div>
+ <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>
 <p>
 EOF
-                   &opt_print ("Parameters", $arguments{$api}, 1);
-                   &opt_print ("Returns", $returns{$api}, 1);
-                   &opt_print ("Description", $bodies{$api}, 0);
-                   print OUT "\n";
+
+#              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);
+           
+               &opt_print ("Returns", $returns{$api}, 1);
+               &opt_print ("Description", $bodies{$api}, 0);
+               print OUT "\n";
            } else {
                if ($line =~ /@API_IDX@/){
                    $apis_toc = &create_toc ($apis[$f]);
                    $line =~ s/\@API_IDX\@/$apis_toc/;
                }
-               if ($line =~ /^<h/){
-                   print OUT "</div>";
+               if ($line =~ /^<h4/){
+                   print OUT "</div></div></div>";
                    $api_shown = 0;
                }
-
+               if ($line =~ /`/){
+               }
                print OUT "$line\n";
            }
        }
        print OUT<<EOF;
+   </div>
 </body>
 </html>
 EOF
@@ -192,11 +320,22 @@ sub process_doc {
        
        # Process arguments
        while (<>){
-               if (/^ \*\*?\//){
-                   $body =~ s/[@#](\w+)/<i>\1<\/i>/g;
-                   $returns =~ s/[@#](\w+)/<i>\1<\/i>/g;
-
+           s/NULL/<code>NULL<\/code>/g;
+           s/TRUE/<code>TRUE<\/code>/g;
+           s/FALSE/<code>FALSE<\/code>/g;
+           if (/^ \*\*?\//){
+                   $body =~ s/@(\w+)/<i>\1<\/i>/g;
+                   $returns =~ s/@(\w+)/<i>\1<\/i>/g;
                    $args =~ s/@(\w+)/<i>\1<\/i>/g;
+
+                   $body =~ s/#(\w+)/<code>\1<\/code>/g;
+                   $returns =~ s/#(\w+)/<code>\1<\/code>/g;
+                   $args =~ s/#(\w+)/<code>\1<\/code>/g;
+
+                   $returns =~ s/\`([:\w\*]+)\`/<code>\1<\/code>/g;
+                   $args =~ s/\`([:\w\*]+)\`/<code>\1<\/code>/g;
+                   $body =~ s/\`([:\w\*]+)\`/<code>\1<\/code>/g;
+                   
                    $body =~ s/\n/ /;
                    $bodies{$func} = $body;
                    $arguments{$func} = $args;
@@ -224,7 +363,8 @@ sub process_doc {
                        if ($1 eq "deprecated"){
                            $deprecated = $2;
                        } else {
-                           $args .= "<dt><i>$1:</i></dt><dd>$2</dd>";
+                           #$args .= "<dt><i>$1:</i></dt><dd>$2</dd>";
+                           $args .= "<tr><td><i>$1</i><td>$2</td></td></tr>";
                        }
                    } else {
                        
@@ -315,7 +455,7 @@ sub opt_print {
     my ($caption, $opttext, $quote) = @_;
 
     if ($opttext ne "" && (!($opttext =~ /^[ \t]+$/))){
-       print OUT "<b>$caption</b>\n";
+       print OUT "<div class=\"api-section\">$caption</div>\n";
        if ($quote == 1){
            print OUT "<blockquote>$opttext</blockquote>\n";
        } else {
index c38ea00f2b28d72b5d258609653b69542156dc4e..15e295839999457500091500cadfab8268e2ed66 100644 (file)
@@ -20,33 +20,33 @@ typedef struct _MonoAssembly MonoAssembly;
 <h4><a name="api:mono_assembly_load">mono_assembly_load</a></h4>
 <h4><a name="api:mono_assembly_load_full">mono_assembly_load_full</a></h4>
 <h4><a name="api:mono_assembly_loaded">mono_assembly_loaded</a></h4>
-<h4><a name="api:mono_assembly_load_from">mono_assembly_load_from</a>
-<h4><a name="api:mono_assembly_load_from_full">mono_assembly_load_from_full</a>
-<h4><a name="api:mono_assembly_load_with_partial_name">mono_assembly_load_with_partial_name</a>
+<h4><a name="api:mono_assembly_load_from">mono_assembly_load_from</a></h4>
+<h4><a name="api:mono_assembly_load_from_full">mono_assembly_load_from_full</a></h4>
+<h4><a name="api:mono_assembly_load_with_partial_name">mono_assembly_load_with_partial_name</a></h4>
 <h4><a name="api:mono_assembly_open">mono_assembly_open</a></h4>
-<h4><a name="api:mono_assembly_open_full">mono_assembly_open_full</a>
-<h4><a name="api:mono_set_assemblies_path">mono_set_assemblies_path</a>
-<h4><a name="api:mono_set_rootdir">mono_set_rootdir</a>
+<h4><a name="api:mono_assembly_open_full">mono_assembly_open_full</a></h4>
+<h4><a name="api:mono_set_assemblies_path">mono_set_assemblies_path</a></h4>
+<h4><a name="api:mono_set_rootdir">mono_set_rootdir</a></h4>
 
 <h3>Working with Assemblies</h3>
 
-<h4><a name="api:mono_assembly_fill_assembly_name">mono_assembly_fill_assembly_name</a>
-<h4><a name="api:mono_assembly_foreach">mono_assembly_foreach</a>
+<h4><a name="api:mono_assembly_fill_assembly_name">mono_assembly_fill_assembly_name</a></h4>
+<h4><a name="api:mono_assembly_foreach">mono_assembly_foreach</a></h4>
 <h4><a name="api:mono_assembly_get_image">mono_assembly_get_image</a></h4>
 <h4><a name="api:mono_assembly_get_main">mono_assembly_get_main</a></h4>
-<h4><a name="api:mono_assembly_get_name">mono_assembly_get_name</a>
+<h4><a name="api:mono_assembly_get_name">mono_assembly_get_name</a></h4>
 <h4><a name="api:mono_assembly_getrootdir">mono_assembly_getrootdir</a></h4>
-<h4><a name="api:mono_assembly_get_assemblyref">mono_assembly_get_assemblyref</a>
-<h4><a name="api:mono_assembly_loaded_full">mono_assembly_loaded_full</a>
-<h4><a name="api:mono_assembly_load_reference">mono_assembly_load_reference</a>
-<h4><a name="api:mono_assembly_load_references">mono_assembly_load_references</a>
-<h4><a name="api:mono_assembly_load_module">mono_assembly_load_module</a>
-<h4><a name="api:mono_assembly_invoke_load_hook">mono_assembly_invoke_load_hook</a>
-<h4><a name="api:mono_assembly_invoke_search_hook">mono_assembly_invoke_search_hook</a>
-<h4><a name="api:mono_assembly_set_main">mono_assembly_set_main</a>
-<h4><a name="api:mono_assembly_setrootdir">mono_assembly_setrootdir</a>
-<h4><a name="api:mono_register_config_for_assembly">mono_register_config_for_assembly</a>
-<h4><a name="api:mono_register_symfile_for_assembly">mono_register_symfile_for_assembly</a>
+<h4><a name="api:mono_assembly_get_assemblyref">mono_assembly_get_assemblyref</a></h4>
+<h4><a name="api:mono_assembly_loaded_full">mono_assembly_loaded_full</a></h4>
+<h4><a name="api:mono_assembly_load_reference">mono_assembly_load_reference</a></h4>
+<h4><a name="api:mono_assembly_load_references">mono_assembly_load_references</a></h4>
+<h4><a name="api:mono_assembly_load_module">mono_assembly_load_module</a></h4>
+<h4><a name="api:mono_assembly_invoke_load_hook">mono_assembly_invoke_load_hook</a></h4>
+<h4><a name="api:mono_assembly_invoke_search_hook">mono_assembly_invoke_search_hook</a></h4>
+<h4><a name="api:mono_assembly_set_main">mono_assembly_set_main</a></h4>
+<h4><a name="api:mono_assembly_setrootdir">mono_assembly_setrootdir</a></h4>
+<h4><a name="api:mono_register_config_for_assembly">mono_register_config_for_assembly</a></h4>
+<h4><a name="api:mono_register_symfile_for_assembly">mono_register_symfile_for_assembly</a></h4>
 
 <h3>Assembly Names</h3>
 
@@ -58,11 +58,11 @@ typedef struct _MonoAssembly MonoAssembly;
        href="http://www.mono-project.com/monodoc/T:System.Reflection.AssemblyName">System.Reflection.AssemblyName</a>
        managed type.
 
-<h4><a name="api:mono_assembly_name_new">mono_assembly_name_new</a>
-<h4><a name="api:mono_assembly_name_get_name">mono_assembly_name_get_name</a>
-<h4><a name="api:mono_assembly_name_get_culture">mono_assembly_name_get_culture</a>
-<h4><a name="api:mono_assembly_name_get_version">mono_assembly_name_get_version</a>
-<h4><a name="api:mono_assembly_name_get_pubkeytoken">mono_assembly_name_get_pubkeytoken</a>
+<h4><a name="api:mono_assembly_name_new">mono_assembly_name_new</a></h4>
+<h4><a name="api:mono_assembly_name_get_name">mono_assembly_name_get_name</a></h4>
+<h4><a name="api:mono_assembly_name_get_culture">mono_assembly_name_get_culture</a></h4>
+<h4><a name="api:mono_assembly_name_get_version">mono_assembly_name_get_version</a></h4>
+<h4><a name="api:mono_assembly_name_get_pubkeytoken">mono_assembly_name_get_pubkeytoken</a></h4>
 <h4><a name="api:mono_assembly_name_free">mono_assembly_name_free</a></h4>
 <h4><a name="api:mono_stringify_assembly_name">mono_stringify_assembly_name</a></h4>
 <h4><a name="api:mono_assembly_names_equal">mono_assembly_names_equal</a></h4>
@@ -77,10 +77,10 @@ typedef struct _MonoAssembly MonoAssembly;
 
 <h3>Advanced</h3>
 
-<h4><a name="api:mono_install_assembly_load_hook">mono_install_assembly_load_hook</a>
-<h4><a name="api:mono_install_assembly_search_hook">mono_install_assembly_search_hook</a>
-<h4><a name="api:mono_install_assembly_refonly_search_hook">mono_install_assembly_refonly_search_hook</a>
-<h4><a name="api:mono_install_assembly_preload_hook">mono_install_assembly_preload_hook</a>
-<h4><a name="api:mono_install_assembly_refonly_preload_hook">mono_install_assembly_refonly_preload_hook</a>
-<h4><a name="api:mono_install_assembly_postload_search_hook">mono_install_assembly_postload_search_hook</a>
-<h4><a name="api:mono_install_assembly_postload_refonly_search_hook">mono_install_assembly_postload_refonly_search_hook</a>
+<h4><a name="api:mono_install_assembly_load_hook">mono_install_assembly_load_hook</a></h4>
+<h4><a name="api:mono_install_assembly_search_hook">mono_install_assembly_search_hook</a></h4>
+<h4><a name="api:mono_install_assembly_refonly_search_hook">mono_install_assembly_refonly_search_hook</a></h4>
+<h4><a name="api:mono_install_assembly_preload_hook">mono_install_assembly_preload_hook</a></h4>
+<h4><a name="api:mono_install_assembly_refonly_preload_hook">mono_install_assembly_refonly_preload_hook</a></h4>
+<h4><a name="api:mono_install_assembly_postload_search_hook">mono_install_assembly_postload_search_hook</a></h4>
+<h4><a name="api:mono_install_assembly_postload_refonly_search_hook">mono_install_assembly_postload_refonly_search_hook</a></h4>
index b6381c786a65a3c0137c1b3768a9a4bab3a3ac61..9ae0bd1449774229af1b6d952694b64759afee67 100644 (file)
@@ -34,30 +34,30 @@ typedef struct _MonoAppContext MonoAppContext
 
 <h4><a name="api:mono_domain_assembly_open">mono_domain_assembly_open</a></h4>
 <h4><a name="api:mono_domain_create">mono_domain_create</a></h4>
-<h4><a name="api:mono_domain_create_appdomain">mono_domain_create_appdomain</a>
+<h4><a name="api:mono_domain_create_appdomain">mono_domain_create_appdomain</a></h4>
 <h4><a name="api:mono_domain_finalize">mono_domain_finalize</a></h4>
 <h4><a name="api:mono_domain_foreach">mono_domain_foreach</a></h4>
 <h4><a name="api:mono_domain_free">mono_domain_free</a></h4>
-<h4><a name="api:mono_domain_from_appdomain">mono_domain_from_appdomain</a>
+<h4><a name="api:mono_domain_from_appdomain">mono_domain_from_appdomain</a></h4>
 <h4><a name="api:mono_domain_get_by_id">mono_domain_get_by_id</a></h4>
-<h4><a name="api:mono_domain_get_friendly_name">mono_domain_get_friendly_name</a>
+<h4><a name="api:mono_domain_get_friendly_name">mono_domain_get_friendly_name</a></h4>
 <h4><a name="api:mono_domain_get_id">mono_domain_get_id</a></h4>
 <h4><a name="api:mono_domain_get">mono_domain_get</a></h4>
 <h4><a name="api:mono_domain_has_type_resolve">mono_domain_has_type_resolve</a></h4>
 <h4><a name="api:mono_domain_is_unloading">mono_domain_is_unloading</a></h4>
 <h4><a name="api:mono_domain_owns_vtable_slot">mono_domain_owns_vtable_slot</a></h4> 
-<h4><a name="api:mono_domain_set_config">mono_domain_set_config</a>
+<h4><a name="api:mono_domain_set_config">mono_domain_set_config</a></h4>
 <h4><a name="api:mono_domain_set_internal">mono_domain_set_internal</a></h4>
 <h4><a name="api:mono_domain_set">mono_domain_set</a></h4>
 <h4><a name="api:mono_domain_try_type_resolve">mono_domain_try_type_resolve</a></h4>
-<h4><a name="api:mono_domain_try_unload">mono_domain_try_unload</a>
-<h4><a name="api:mono_domain_unload">mono_domain_unload</a>
+<h4><a name="api:mono_domain_try_unload">mono_domain_try_unload</a></h4>
+<h4><a name="api:mono_domain_unload">mono_domain_unload</a></h4>
 
 <h3>Contexts</h3>
 
-<h4><a name="api:mono_context_init">mono_context_init</a>
+<h4><a name="api:mono_context_init">mono_context_init</a></h4>
 <h4><a name="api:mono_context_get">mono_context_get</a></h4>
-<h4><a name="api:mono_context_get_domain_id">mono_context_get_domain_id</a>
-<h4><a name="api:mono_context_get_id">mono_context_get_id</a>
+<h4><a name="api:mono_context_get_domain_id">mono_context_get_domain_id</a></h4>
+<h4><a name="api:mono_context_get_id">mono_context_get_id</a></h4>
 <h4><a name="api:mono_context_set">mono_context_set</a></h4>
 <h4><a name="api:mono_context_get_desc">mono_context_get_desc</a></h4>
index 1199c45697b2518884b20d8100c573d0291874c5..4c4329f634a6a636ec1720de3d2345705b30f789 100644 (file)
@@ -150,7 +150,7 @@ getMessage ()
 <h4><a name="api:mono_config_string_for_assembly_file">mono_config_string_for_assembly_file</a></h4>
 <h4><a name="api:mono_get_config_dir">mono_get_config_dir</a></h4>
 <h4><a name="api:mono_get_machine_config">mono_get_machine_config</a></h4>
-<h4><a name="api:mono_register_machine_config">mono_register_machine_config</a>
+<h4><a name="api:mono_register_machine_config">mono_register_machine_config</a></h4>
 <h4><a name="api:mono_set_config_dir">mono_set_config_dir</a></h4>
 
 <h3>Advanced Execution Setups</h3>
index d21b08fc6fd5db8737277e5286d2fd0e07d924b3..14548c4e9d3ed81fb927c3f460472bdd709c1e7f 100644 (file)
@@ -7,10 +7,10 @@
 <h3>JIT Information</h3>
 
 
-<h4><a name="api:mono_jit_info_get_code_size">mono_jit_info_get_code_size</a>
-<h4><a name="api:mono_jit_info_get_code_start">mono_jit_info_get_code_start</a>
-<h4><a name="api:mono_jit_info_get_method">mono_jit_info_get_method</a>
-<h4><a name="api:mono_jit_info_table_find">mono_jit_info_table_find</a>
+<h4><a name="api:mono_jit_info_get_code_size">mono_jit_info_get_code_size</a></h4>
+<h4><a name="api:mono_jit_info_get_code_start">mono_jit_info_get_code_start</a></h4>
+<h4><a name="api:mono_jit_info_get_method">mono_jit_info_get_method</a></h4>
+<h4><a name="api:mono_jit_info_table_find">mono_jit_info_table_find</a></h4>
 
 <h3>Useful Debugging Functions</h3>
 
index 3a939a868ba015bf46b17ec56206705fdf08aea2..82ad87936a739155c76cef655f3d0ec2c06ec692 100644 (file)
@@ -527,7 +527,7 @@ mono_domain_create_appdomain_internal (char *friendly_name, MonoAppDomainSetup *
  * mono_domain_has_type_resolve:
  * @domain: application domains being looked up
  *
- * Returns true if the AppDomain.TypeResolve field has been
+ * Returns: TRUE if the AppDomain.TypeResolve field has been
  * set.
  */
 gboolean
index f381d464b98988397e28d31466b705fd7f6d4e01..a4d20e464a8c48b6c2a3f9b867cf8885a592c5c3 100644 (file)
@@ -1039,10 +1039,13 @@ mono_assembly_remap_version (MonoAssemblyName *aname, MonoAssemblyName *dest_ana
        return aname;
 }
 
-/*
+/**
  * mono_assembly_get_assemblyref:
+ * @image: pointer to the MonoImage to extract the information from.
+ * @index: index to the assembly reference in the image.
+ * @aname: pointer to a `MonoAssemblyName` that will hold the returned value.
  *
- *   Fill out ANAME with the assembly name of the INDEXth assembly reference in IMAGE.
+ * Fills out the @aname with the assembly name of the @index assembly reference in @image.
  */
 void
 mono_assembly_get_assemblyref (MonoImage *image, int index, MonoAssemblyName *aname)
@@ -1182,6 +1185,14 @@ mono_assembly_load_reference (MonoImage *image, int index)
        }
 }
 
+/**
+ * mono_assembly_load_references:
+ * @image: 
+ * @status:
+ * @deprecated: There is no reason to use this method anymore, it does nothing
+ *
+ * This method is now a no-op, it does nothing other than setting the @status to #MONO_IMAGE_OK
+ */
 void
 mono_assembly_load_references (MonoImage *image, MonoImageOpenStatus *status)
 {
@@ -1487,7 +1498,7 @@ absolute_dir (const gchar *filename)
 /** 
  * mono_assembly_open_from_bundle:
  * @filename: Filename requested
- * @status: return value
+ * @status: return status code
  *
  * This routine tries to open the assembly specified by `filename' from the
  * defined bundles, if found, returns the MonoImage for it, if not found
@@ -1528,6 +1539,31 @@ mono_assembly_open_from_bundle (const char *filename, MonoImageOpenStatus *statu
        return NULL;
 }
 
+/**
+ * mono_assemblies_open_full:
+ * @filename: the file to load
+ * @status: return status code 
+ * @refonly: Whether this assembly is being opened in "reflection-only" mode.
+* 
+ * This loads an assembly from the specified @filename.   The @filename allows
+ * a local URL (starting with a file:// prefix).  If a file prefix is used, the
+ * filename is interpreted as a URL, and the filename is URL-decoded.   Otherwise the file
+ * is treated as a local path.
+ *
+ * First, an attempt is made to load the assembly from the bundled executable (for those
+ * deployments that have been done with the `mkbundle` tool or for scenarios where the
+ * assembly has been registered as an embedded assembly).   If this is not the case, then
+ * the assembly is loaded from disk using `api:mono_image_open_full`.
+ *
+ * If the pointed assembly does not live in the Global Assembly Cache, a shadow copy of
+ * the assembly is made.
+ *
+ * If @refonly is set to true, then the assembly is loaded purely for inspection with
+ * the `System.Reflection` API.
+ *
+ * Returns: NULL on error, with the @status set to an error code, or a pointer
+ * to the assembly.
+ */
 MonoAssembly *
 mono_assembly_open_full (const char *filename, MonoImageOpenStatus *status, gboolean refonly)
 {
@@ -1640,7 +1676,7 @@ free_item (gpointer val, gpointer user_data)
        g_free (val);
 }
 
-/*
+/**
  * mono_assembly_load_friends:
  * @ass: an assembly
  *
@@ -1726,10 +1762,20 @@ mono_assembly_load_friends (MonoAssembly* ass)
 /**
  * mono_assembly_open:
  * @filename: Opens the assembly pointed out by this name
- * @status: where a status code can be returned
+ * @status: return status code
+ *
+ * This loads an assembly from the specified @filename.   The @filename allows
+ * a local URL (starting with a file:// prefix).  If a file prefix is used, the
+ * filename is interpreted as a URL, and the filename is URL-decoded.   Otherwise the file
+ * is treated as a local path.
  *
- * mono_assembly_open opens the PE-image pointed by @filename, and
- * loads any external assemblies referenced by it.
+ * First, an attempt is made to load the assembly from the bundled executable (for those
+ * deployments that have been done with the `mkbundle` tool or for scenarios where the
+ * assembly has been registered as an embedded assembly).   If this is not the case, then
+ * the assembly is loaded from disk using `api:mono_image_open_full`.
+ *
+ * If the pointed assembly does not live in the Global Assembly Cache, a shadow copy of
+ * the assembly is made.
  *
  * Return: a pointer to the MonoAssembly if @filename contains a valid
  * assembly or NULL on error.  Details about the error are stored in the
@@ -1741,6 +1787,25 @@ mono_assembly_open (const char *filename, MonoImageOpenStatus *status)
        return mono_assembly_open_full (filename, status, FALSE);
 }
 
+/**
+ * mono_assembly_load_from_full:
+ * @image: Image to load the assembly from
+ * @fname: assembly name to associate with the assembly
+ * @status: returns the status condition
+ * @refonly: Whether this assembly is being opened in "reflection-only" mode.
+ *
+ * If the provided @image has an assembly reference, it will process the given
+ * image as an assembly with the given name.
+ *
+ * Most likely you want to use the `api:mono_assembly_load_full` method instead.
+ *
+ * Returns: A valid pointer to a `MonoAssembly*` on success and the @status will be
+ * set to #MONO_IMAGE_OK;  or NULL on error.
+ *
+ * If there is an error loading the assembly the @status will indicate the
+ * reason with @status being set to `MONO_IMAGE_INVALID` if the
+ * image did not contain an assembly reference table.
+ */
 MonoAssembly *
 mono_assembly_load_from_full (MonoImage *image, const char*fname, 
                              MonoImageOpenStatus *status, gboolean refonly)
@@ -1846,6 +1911,27 @@ mono_assembly_load_from_full (MonoImage *image, const char*fname,
        return ass;
 }
 
+/**
+ * mono_assembly_load_from:
+ * @image: Image to load the assembly from
+ * @fname: assembly name to associate with the assembly
+ * @status: return status code
+ *
+ * If the provided @image has an assembly reference, it will process the given
+ * image as an assembly with the given name.
+ *
+ * Most likely you want to use the `api:mono_assembly_load_full` method instead.
+ *
+ * This is equivalent to calling `api:mono_assembly_load_from_full` with the
+ * @refonly parameter set to FALSE.
+ * Returns: A valid pointer to a `MonoAssembly*` on success and the @status will be
+ * set to #MONO_IMAGE_OK;  or NULL on error.
+ *
+ * If there is an error loading the assembly the @status will indicate the
+ * reason with @status being set to `MONO_IMAGE_INVALID` if the
+ * image did not contain an assembly reference table.
+ */
 MonoAssembly *
 mono_assembly_load_from (MonoImage *image, const char *fname,
                         MonoImageOpenStatus *status)
@@ -2276,7 +2362,7 @@ unquote (const char *str)
  * Parses an assembly qualified type name and assigns the name,
  * version, culture and token to the provided assembly name object.
  *
- * Returns: true if the name could be parsed.
+ * Returns: TRUE if the name could be parsed.
  */
 gboolean
 mono_assembly_name_parse (const char *name, MonoAssemblyName *aname)
@@ -2406,6 +2492,23 @@ probe_for_partial_name (const char *basepath, const char *fullname, MonoAssembly
        }
 }
 
+/**
+ * mono_assembly_load_with_partial_name:
+ * @name: an assembly name that is then parsed by `api:mono_assembly_name_parse`.
+ * @status: return status code
+ *
+ * Loads a Mono Assembly from a name.  The name is parsed using `api:mono_assembly_name_parse`,
+ * so it might contain a qualified type name, version, culture and token.
+ *
+ * This will load the assembly from the file whose name is derived from the assembly name
+ * by appending the .dll extension.
+ *
+ * The assembly is loaded from either one of the extra Global Assembly Caches specified
+ * by the extra GAC paths (specified by the `MONO_GAC_PREFIX` environment variable) or
+ * if that fails from the GAC.
+ *
+ * Returns: NULL on failure, or a pointer to a MonoAssembly on success.   
+ */
 MonoAssembly*
 mono_assembly_load_with_partial_name (const char *name, MonoImageOpenStatus *status)
 {
@@ -3101,6 +3204,15 @@ mono_assembly_load (MonoAssemblyName *aname, const char *basedir, MonoImageOpenS
        return mono_assembly_load_full_internal (aname, NULL, basedir, status, FALSE);
 }
 
+/**
+ * mono_assembly_loaded_full:
+ * @aname: an assembly to look for.
+ * @refonly: Whether this assembly is being opened in "reflection-only" mode.
+ *
+ * This is used to determine if the specified assembly has been loaded
+ * Returns: NULL If the given @aname assembly has not been loaded, or a pointer to
+ * a `MonoAssembly` that matches the `MonoAssemblyName` specified.
+ */
 MonoAssembly*
 mono_assembly_loaded_full (MonoAssemblyName *aname, gboolean refonly)
 {
@@ -3118,8 +3230,10 @@ mono_assembly_loaded_full (MonoAssemblyName *aname, gboolean refonly)
  * mono_assembly_loaded:
  * @aname: an assembly to look for.
  *
+ * This is used to determine if the specified assembly has been loaded
  * Returns: NULL If the given @aname assembly has not been loaded, or a pointer to
- * a MonoAssembly that matches the MonoAssemblyName specified.
+ * a `MonoAssembly` that matches the `MonoAssemblyName` specified.
  */
 MonoAssembly*
 mono_assembly_loaded (MonoAssemblyName *aname)
@@ -3223,6 +3337,18 @@ mono_assembly_load_module (MonoAssembly *assembly, guint32 idx)
        return mono_image_load_file_for_image (assembly->image, idx);
 }
 
+/**
+ * mono_assembly_foreach:
+ * @func: function to invoke for each assembly loaded
+ * @user_data: data passed to the callback
+ *
+ * Invokes the provided @func callback for each assembly loaded into
+ * the runtime.   The first parameter passed to the callback  is the
+ * `MonoAssembly*`, and the second parameter is the @user_data.
+ *
+ * This is done for all assemblies loaded in the runtime, not just
+ * those loaded in the current application domain.
+ */
 void
 mono_assembly_foreach (GFunc func, gpointer user_data)
 {
index c13e015c3b1de7066f1ed374346ae4bd42782b01..f7844b39bbfd3544bb14669ff895caa5c961b5dc 100644 (file)
@@ -1787,7 +1787,7 @@ mono_gchandle_set_target (guint32 gchandle, MonoObject *obj)
  * @gchandle: a GCHandle's handle.
  * @domain: An application domain.
  *
- * Returns: true if the object wrapped by the @gchandle belongs to the specific @domain.
+ * Returns: TRUE if the object wrapped by the @gchandle belongs to the specific @domain.
  */
 gboolean
 mono_gc_is_null (void)
index b6538c7d6f1b0af3d9a6de886ad853ad8c75f3a3..44189c2608c9011642931331242427b9ae059fcc 100644 (file)
@@ -631,11 +631,11 @@ mono_type_get_underlying_type (MonoType *type)
        return type;
 }
 
-/*
+/**
  * mono_class_is_open_constructed_type:
  * @type: a type
  *
- * Returns TRUE if type represents a generics open constructed type.
+ * Returns: TRUE if type represents a generics open constructed type.
  * IOW, not all type parameters required for the instantiation have
  * been provided or it's a generic type definition.
  *
@@ -2911,7 +2911,7 @@ mono_class_interface_offset (MonoClass *klass, MonoClass *itf) {
        }
 }
 
-/*
+/**
  * mono_class_interface_offset_with_variance:
  * 
  * Return the interface offset of @itf in @klass. Sets @non_exact_match to TRUE if the match required variance check
@@ -8038,11 +8038,11 @@ mono_class_from_name (MonoImage *image, const char* name_space, const char *name
  * This method determines whether @klass is a subclass of @klassc.
  *
  * If the @check_interfaces flag is set, then if @klassc is an interface
- * this method return true if the @klass implements the interface or
+ * this method return TRUE if the @klass implements the interface or
  * if @klass is an interface, if one of its base classes is @klass.
  *
  * If @check_interfaces is false then, then if @klass is not an interface
- * then it returns true if the @klass is a subclass of @klassc.
+ * then it returns TRUE if the @klass is a subclass of @klassc.
  *
  * if @klass is an interface and @klassc is System.Object, then this function
  * return true.
@@ -8129,8 +8129,9 @@ mono_gparam_is_reference_conversible (MonoClass *target, MonoClass *candidate, g
  * @klass: the class to be assigned to
  * @oklass: the source class
  * 
- * Both klass and oklass must be instances of the same generic interface.
- * Return true if @klass can be assigned to a @klass variable
+ * Both @klass and @oklass must be instances of the same generic interface.
+ *
+ * Returns: TRUE if @klass can be assigned to a @klass variable
  */
 gboolean
 mono_class_is_variant_compatible (MonoClass *klass, MonoClass *oklass, gboolean check_for_reference_conv)
@@ -8281,7 +8282,7 @@ mono_gparam_is_assignable_from (MonoClass *target, MonoClass *candidate)
  * @klass: the class to be assigned to
  * @oklass: the source class
  *
- * Return: true if an instance of object oklass can be assigned to an
+ * Returns: TRUE if an instance of object oklass can be assigned to an
  * instance of object @klass
  */
 gboolean
@@ -8887,7 +8888,7 @@ mono_class_get_element_class (MonoClass *klass)
  * mono_class_is_valuetype:
  * @klass: the MonoClass to act on
  *
- * Returns: true if the MonoClass represents a ValueType.
+ * Returns: TRUE if the MonoClass represents a ValueType.
  */
 gboolean
 mono_class_is_valuetype (MonoClass *klass)
@@ -8899,7 +8900,7 @@ mono_class_is_valuetype (MonoClass *klass)
  * mono_class_is_enum:
  * @klass: the MonoClass to act on
  *
- * Returns: true if the MonoClass represents an enumeration.
+ * Returns: TRUE if the MonoClass represents an enumeration.
  */
 gboolean
 mono_class_is_enum (MonoClass *klass)
@@ -9472,7 +9473,7 @@ mono_class_get_nested_types (MonoClass* klass, gpointer *iter)
  * mono_class_is_delegate
  * @klass: the MonoClass to act on
  *
- * Returns: true if the MonoClass represents a System.Delegate.
+ * Returns: TRUE if the MonoClass represents a System.Delegate.
  */
 mono_bool
 mono_class_is_delegate (MonoClass *klass)
@@ -9485,7 +9486,7 @@ mono_class_is_delegate (MonoClass *klass)
  * @klass: The MonoClass to act on
  * @interface: The interface to check if @klass implements.
  *
- * Returns: true if @klass implements @interface.
+ * Returns: TRUE if @klass implements @interface.
  */
 mono_bool
 mono_class_implements_interface (MonoClass* klass, MonoClass* iface)
@@ -10300,7 +10301,7 @@ can_access_member (MonoClass *access_klass, MonoClass *member_klass, MonoClass*
  *
  * Used to determine if a method is allowed to access the specified field.
  *
- * Returns: true if the given @method is allowed to access the @field while following
+ * Returns: TRUE if the given @method is allowed to access the @field while following
  * the accessibility rules of the CLI.
  */
 gboolean
@@ -10327,7 +10328,7 @@ mono_method_can_access_field (MonoMethod *method, MonoClassField *field)
  *
  * Used to determine if the @method is allowed to access the specified @called method.
  *
- * Returns: true if the given @method is allowed to invoke the @called while following
+ * Returns: TRUE if the given @method is allowed to invoke the @called while following
  * the accessibility rules of the CLI.
  */
 gboolean
index c372266713b7a0cb5474f9262810db4c0ce876ac..2364b0b36375eabc08cb8f924e650cb875de5450 100644 (file)
@@ -890,7 +890,7 @@ mono_gc_is_finalizer_internal_thread (MonoInternalThread *thread)
  * This routine tests whether the @thread argument represents the
  * finalization thread.
  * 
- * Returns true if @thread is the finalization thread.
+ * Returns: TRUE if @thread is the finalization thread.
  */
 gboolean
 mono_gc_is_finalizer_thread (MonoThread *thread)
index e50ad0288c968135460f054b7e73e34f5406f363..3e0316df9d4510bad94fde925574ed4c5f1629b0 100644 (file)
@@ -3606,7 +3606,7 @@ parse_section_data (MonoImage *m, int *num_clauses, const unsigned char *ptr)
  * @summary: Where to store the header
  *
  *
- * Returns: true if the header was properly decoded.
+ * Returns: TRUE if the header was properly decoded.
  */
 gboolean
 mono_method_get_header_summary (MonoMethod *method, MonoMethodHeaderSummary *summary)
index 7e001b9984945bc85930752e9e7ba9da436d58c7..fcd8782387635f0b44c57b60da57e779ab257c4c 100644 (file)
@@ -81,11 +81,14 @@ mono_runtime_fire_process_exit_event (void)
 }
 
 
-/*
+/**
+ * mono_runtime_try_shutdown:
+ *
  * Try to initialize runtime shutdown.
+ *
  * After this call completes the thread pool will stop accepting new jobs and no further threads will be created.
  *
- * @return true if shutdown was initiated by this call or false is other thread beat this one
+ * Returns: TRUE if shutdown was initiated by this call or false is other thread beat this one.
  */
 gboolean
 mono_runtime_try_shutdown (void)
index a442c763af66c0bea073704d85671414bd800465..74ee377c49a8eb5f2275bbc7f8f2e9539398b801 100644 (file)
@@ -2605,7 +2605,7 @@ sgen_client_metadata_for_object (GCObject *obj)
  * @gchandle: a GCHandle's handle.
  * @domain: An application domain.
  *
- * Returns: true if the object wrapped by the @gchandle belongs to the specific @domain.
+ * Returns: TRUE if the object wrapped by the @gchandle belongs to the specific @domain.
  */
 gboolean
 mono_gchandle_is_in_domain (guint32 gchandle, MonoDomain *domain)
index 668b31e3268b355472cfb272cc31ed6b7fecc66c..9bd451ee71cba9001ba2466177cafdc3bb833455 100644 (file)
@@ -4819,7 +4819,7 @@ self_suspend_internal (MonoInternalThread *thread)
  * This function allows one to determine if a thread was created by the mono runtime and has
  * a well defined lifecycle or it's a foreigh one, created by the native environment.
  *
- * Returns: true if @thread was not created by the runtime.
+ * Returns: TRUE if @thread was not created by the runtime.
  */
 mono_bool
 mono_thread_is_foreign (MonoThread *thread)
index e9af9516a1b4652f3e43ca9b3dd254addad43a0f..8058c5fb37e82f6337ba489b3943d4181b021b8c 100644 (file)
@@ -390,7 +390,7 @@ mono_type_create_fnptr_from_mono_method (VerifyContext *ctx, MonoMethod *method)
 /*
  * mono_type_is_enum_type:
  * 
- * Returns TRUE if @type is an enum type. 
+ * Returns: TRUE if @type is an enum type. 
  */
 static gboolean
 mono_type_is_enum_type (MonoType *type)
@@ -405,7 +405,7 @@ mono_type_is_enum_type (MonoType *type)
 /*
  * mono_type_is_value_type:
  * 
- * Returns TRUE if @type is named after @namespace.@name.
+ * Returns: TRUE if @type is named after @namespace.@name.
  * 
  */
 static gboolean
@@ -639,8 +639,10 @@ is_valid_generic_instantiation (MonoGenericContainer *gc, MonoGenericContext *co
        return TRUE;
 }
 
-/*
- * Return true if @candidate is constraint compatible with @target.
+/**
+ * mono_generic_param_is_constraint_compatible:
+ *
+ * Returns: TRUE if @candidate is constraint compatible with @target.
  * 
  * This means that @candidate constraints are a super set of @target constaints
  */
@@ -1875,8 +1877,12 @@ dump_stack_state (ILCodeDesc *state)
 }
 #endif
 
-/*Returns TRUE if candidate array type can be assigned to target.
- *Both parameters MUST be of type MONO_TYPE_ARRAY (target->type == MONO_TYPE_ARRAY)
+/**
+ * is_array_type_compatible:
+ *
+ * Returns TRUE if candidate array type can be assigned to target.
+ *
+ * Both parameters MUST be of type MONO_TYPE_ARRAY (target->type == MONO_TYPE_ARRAY)
  */
 static gboolean
 is_array_type_compatible (MonoType *target, MonoType *candidate)
@@ -2455,10 +2461,10 @@ recursive_boxed_constraint_type_check (VerifyContext *ctx, MonoType *type, MonoC
        return FALSE;
 }
 
-/*
+/*
  * is_compatible_boxed_valuetype:
  * 
- * Returns TRUE if @candidate / @stack is a valid boxed valuetype. 
+ * Returns: TRUE if @candidate / @stack is a valid boxed valuetype. 
  * 
  * @type The source type. It it tested to be of the proper type.    
  * @candidate type of the boxed valuetype.
@@ -4711,7 +4717,7 @@ end_verify:
 #define HANDLER_START(clause) ((clause)->flags == MONO_EXCEPTION_CLAUSE_FILTER ? (clause)->data.filter_offset : clause->handler_offset)
 #define IS_CATCH_OR_FILTER(clause) ((clause)->flags == MONO_EXCEPTION_CLAUSE_FILTER || (clause)->flags == MONO_EXCEPTION_CLAUSE_NONE)
 
-/*
+/**
  * is_clause_in_range :
  * 
  * Returns TRUE if either the protected block or the handler of @clause is in the @start - @end range.  
@@ -4726,7 +4732,7 @@ is_clause_in_range (MonoExceptionClause *clause, guint32 start, guint32 end)
        return FALSE;
 }
 
-/*
+/**
  * is_clause_inside_range :
  * 
  * Returns TRUE if @clause lies completely inside the @start - @end range.  
@@ -4741,7 +4747,7 @@ is_clause_inside_range (MonoExceptionClause *clause, guint32 start, guint32 end)
        return TRUE;
 }
 
-/*
+/**
  * is_clause_nested :
  * 
  * Returns TRUE if @nested is nested in @clause.   
@@ -6020,8 +6026,11 @@ mono_verify_corlib ()
        return NULL;
 }
 
-/*
- * Returns true if @method needs to be verified.
+/**
+ * mono_verifier_is_enabled_for_method:
+ * @method: the method to probe
+ *
+ * Returns TRUE if @method needs to be verified.
  * 
  */
 gboolean
@@ -6030,8 +6039,11 @@ mono_verifier_is_enabled_for_method (MonoMethod *method)
        return mono_verifier_is_enabled_for_class (method->klass) && (method->wrapper_type == MONO_WRAPPER_NONE || method->wrapper_type == MONO_WRAPPER_DYNAMIC_METHOD);
 }
 
-/*
- * Returns true if @klass need to be verified.
+/**
+ * mono_verifier_is_enabled_for_class:
+ * @klass: The `MonoClass` to probe
+ *
+ * Returns TRUE if @klass need to be verified.
  * 
  */
 gboolean