[kde-doc-english] [rocs/scriptInterfaceDocumentation] doc: Create example API documentation.

Andreas Cord-Landwehr cola at uni-paderborn.de
Wed Mar 20 20:27:15 UTC 2013


Git commit 57aa1e314203032388a19e700dd00c6cecd869d6 by Andreas Cord-Landwehr.
Committed on 20/03/2013 at 20:45.
Pushed by cordlandwehr into branch 'scriptInterfaceDocumentation'.

Create example API documentation.

This piece of documentation is the goal that should be generated
automatically by our (to be invented) scripts.

M  +3    -0    doc/index.docbook
A  +62   -0    doc/scripting-api.docbook

http://commits.kde.org/rocs/57aa1e314203032388a19e700dd00c6cecd869d6

diff --git a/doc/index.docbook b/doc/index.docbook
index 590def3..d97d3b9 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -5,6 +5,7 @@
   <!ENTITY package "kdeedu">
   <!ENTITY % addindex "IGNORE">
   <!ENTITY % English "INCLUDE">
+  <!ENTITY scriptingapi SYSTEM "scripting-api.docbook">
 ]>
 <book id="rocs" lang="&language;">
 
@@ -961,6 +962,8 @@ digraph myGraph {
 </sect1>
 </chapter>
 
+&scriptingapi;   <!--Scripting Interface API Documentation-->
+
 <chapter id="credits">
 <title>Credits and License</title>
 
diff --git a/doc/scripting-api.docbook b/doc/scripting-api.docbook
new file mode 100644
index 0000000..fe79921
--- /dev/null
+++ b/doc/scripting-api.docbook
@@ -0,0 +1,62 @@
+<chapter id="scripting-api">
+<title>The Scripting API</title>
+
+<sect1 id="include-scripting-interface">
+<title>Scripting Interfaces</title>
+<sect2>
+<title>Console Object</title>
+<para>
+    The Console object allows you to print messages of different importance to a log.
+</para>
+<para>
+    Console is not a constructor. All properties and methods of Console can be called by using Console as an object, without creating it.
+</para>
+</sect2>
+<sect2>
+<title>Syntax</title>
+<programlisting>
+Console.log("This is a program message."); // print a program message
+Console.debug("A debug message."); // print a debug message
+</programlisting>
+</sect2>
+<sect2>
+<title>Console Object Methods</title>
+<sect3>
+<title>log()</title>
+<para>
+    Print the given message of normal severity.
+</para>
+<funcsynopsis>
+<funcprototype>
+<funcdef>void <function>log</function></funcdef>
+    <paramdef>string <parameter>message</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+</sect3>
+<sect3>
+<title>debug()</title>
+<para>
+    Print the given debug message.
+</para>
+<funcsynopsis>
+<funcprototype>
+<funcdef>void <function>debug</function></funcdef>
+    <paramdef>string <parameter>message</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+</sect3>
+<sect3>
+<title>error()</title>
+<para>
+    Print the given error message of high severity.
+</para>
+<funcsynopsis>
+<funcprototype>
+<funcdef>void <function>error</function></funcdef>
+    <paramdef>string <parameter>message</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+</sect3>
+</sect2>
+</sect1>
+</chapter>



More information about the kde-doc-english mailing list