summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRaffaele Sandrini <raffaele@sandrini.ch>2008-02-24 11:36:37 +0000
committerRaffaele Sandrini <rasa@src.gnome.org>2008-02-24 11:36:37 +0000
commitf74c2c427757bb42420f9fbdc935f6d5a199c933 (patch)
treeea462bf98c6d37ecae00bd9359ac68f655b8c1f3 /doc
parentb3c078d8ea78782a28815b6e6062b6e07bc8533f (diff)
downloadvala-f74c2c427757bb42420f9fbdc935f6d5a199c933.tar.gz
add some interface documentation, patch by Johannes Schmid
2008-02-24 Raffaele Sandrini <raffaele@sandrini.ch> * doc/vala/interfaces.xml: add some interface documentation, patch by Johannes Schmid svn path=/trunk/; revision=1046
Diffstat (limited to 'doc')
-rw-r--r--doc/vala/interfaces.xml32
1 files changed, 26 insertions, 6 deletions
diff --git a/doc/vala/interfaces.xml b/doc/vala/interfaces.xml
index 6f5f2baa2..fa473ea82 100644
--- a/doc/vala/interfaces.xml
+++ b/doc/vala/interfaces.xml
@@ -1,21 +1,41 @@
<?xml version="1.0"?>
<section id="interfaces">
<h>Interfaces</h>
+ <p>Interfaces can be implemented by classes to provide functionality with a common interface. Each class
+ can implement multiple interface and interfaces can require other interfaces to be implemented.</p>
<section id="declaration">
<h>Interface declarations</h>
- <p>Documentation</p>
+ <blockcode>
+ public interface InterfaceName : RequiredInterface &lt;optional&gt;
+ {
+ &lt;interface members&gt;
+ }
+ </blockcode>
</section>
<section id="methods">
<h>Methods</h>
- <p>Documentation</p>
+ <p>Interfaces can contain abstract and non abstract methods.</p>
+ <blockcode>
+ public abstract void MethodName ();
+ public void MethodName2 ()
+ {
+ &lt;Implementation&gt;
+ }
+ </blockcode>
</section>
- <section id="properties">
- <h>Properties</h>
- <p>Documentation</p>
+ <section id="delegates">
+ <h>Delegates</h>
+ <p>Interfaces can also contain delegates</p>
+ <blockcode>
+ public delegate void DelegateName (void* data);
+ </blockcode>
</section>
<section id="signals">
<h>Signals</h>
- <p>Documentation</p>
+ <p>Signals are also supported by interfaces</p>
+ <blockcode>
+ public signal void SignalName ();
+ </blockcode>
</section>
</section>