summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-09-21 14:29:50 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-09-21 14:29:50 +0200
commit6eaadaa0e4ad8ce906aa8ccee63d91f0d9cb28ea (patch)
tree1b37a1eb40ad1fdec0a2bebc167f7f8128497748 /docs
parente6a6eb9aede59a1f7441b926b36afefd9c42b91d (diff)
parent9f262857d13a3e0d7ee214b33b90359c51227718 (diff)
downloaduca-6eaadaa0e4ad8ce906aa8ccee63d91f0d9cb28ea.tar.gz
uca-6eaadaa0e4ad8ce906aa8ccee63d91f0d9cb28ea.tar.bz2
uca-6eaadaa0e4ad8ce906aa8ccee63d91f0d9cb28ea.tar.xz
uca-6eaadaa0e4ad8ce906aa8ccee63d91f0d9cb28ea.zip
Merge branch 'plugins'
Diffstat (limited to 'docs')
-rw-r--r--docs/manual.md43
-rw-r--r--docs/style.css95
2 files changed, 89 insertions, 49 deletions
diff --git a/docs/manual.md b/docs/manual.md
index 0373010..5600d3f 100644
--- a/docs/manual.md
+++ b/docs/manual.md
@@ -107,6 +107,7 @@ necessary header files:
~~~ {.c}
#include <glib-object.h>
+#include <uca-plugin-manager.h>
#include <uca-camera.h>
~~~
@@ -116,6 +117,7 @@ Then you need to setup the type system:
int
main (int argc, char *argv[])
{
+ UcaPluginManager *manager;
UcaCamera *camera;
GError *error = NULL; /* this _must_ be set to NULL */
@@ -124,10 +126,12 @@ main (int argc, char *argv[])
Now you can instantiate new camera _objects_. Each camera is identified by a
human-readable string, in this case we want to access any pco camera that is
-supported by [libpco][]:
+supported by [libpco][]. To instantiate a camera we have to create a plugin
+manager first:
~~~ {.c}
- camera = uca_camera_new ("pco", &error);
+ manager = uca_plugin_manager_new ();
+ camera = uca_plugin_manager_new_camera (manager, "pco", &error);
~~~
Errors are indicated with a returned value `NULL` and `error` set to a value
@@ -252,38 +256,19 @@ communicate with the camera. Now we will go into more detail.
We have already seen how to instantiate a camera object from a name. If you have
more than one camera connected to a machine, you will most likely want the user
decide which to use. To do so, you can enumerate all camera strings with
-`uca_camera_get_types`:
+`uca_plugin_manager_get_available_cameras`:
~~~ {.c}
- gchar **types;
+ GList *types;
- types = uca_camera_get_types ();
+ types = uca_camera_get_available_cameras (manager);
- for (guint i = 0; types[i] != NULL; i++)
- g_print ("%s\n", types[i]);
+ for (GList *it = g_list_first; it != NULL; it = g_list_next (it))
+ g_print ("%s\n", (gchar *) it->data);
- /* free the string array */
- g_strfreev (types);
-~~~
-
-If you _know_ which camera you want to use you can instantiate the sub-classed
-camera object directly. In this case we create a pco-based camera:
-
-~~~ {.c}
-#include <glib-object.h>
-#include <uca/uca-camera-pco.h>
-
-int
-main (int argc, char *argv[])
-{
- UcaPcoCamera *camera;
- GError *error = NULL;
-
- g_type_init ();
- camera = uca_pco_camera_new (&error);
- g_object_unref (camera);
- return 0;
-}
+ /* free the strings and the list */
+ g_list_foreach (types, (GFunc) g_free, NULL);
+ g_list_free (types);
~~~
[last section]: #first-look-at-the-api
diff --git a/docs/style.css b/docs/style.css
index a9fc9ca..646a097 100644
--- a/docs/style.css
+++ b/docs/style.css
@@ -1,35 +1,34 @@
-
/* --- Reset ------------------------------------------------------ */
body, div, dl, dt, dd, ul, ol, li,
h1, h2, h3, h4, h5, h6,
pre, form, fieldset, input, textarea,
-p, blockquote, th, td {
- margin: 0;
+p, blockquote, th, td {
+ margin: 0;
padding: 0;
}
table {
- border-collapse: collapse;
+ border-collapse: collapse;
border-spacing: 0;
}
fieldset, img {
- border: 0;
- }
- address, caption, cite, dfn, th, var {
+ border: 0;
+}
+address, caption, cite, dfn, th, var {
font-style: normal;
- font-weight: normal;
- }
- caption, th {
+ font-weight: normal;
+}
+caption, th {
text-align: left;
}
h1, h2, h3, h4, h5, h6 {
- font-size: 100%;
+ font-size: 100%;
font-weight: normal;
}
q:before, q:after {
- content: '';
- }
- abbr, acronym {
+ content: '';
+}
+abbr, acronym {
border: 0;
}
@@ -52,10 +51,6 @@ p {
margin-bottom: 24px;
}
-/* p > code { */
-/* font-size: 0.8em; */
-/* } */
-
h1, h2, h3, h4, h5, h6 {
margin-bottom: 24px;
font-family: "Droid Sans", sans-serif;
@@ -65,6 +60,9 @@ h1, h2, h3, h4, h5, h6 {
h1 {
font-size: 1.5em;
line-height: 1em;
+ margin-top: 2em;
+ padding-bottom: 0.5em;
+ border-bottom: 2px dotted #bbb;
}
h2 {
@@ -87,11 +85,29 @@ h5, h6 {
line-height: 1.5em;
}
-h1 > a, h2 > a, h3 > a, h4 > a, h5 > a, h6 > a {
- color: black;
+h1 > a {
+ color: #555;
+ text-decoration: none;
+}
+
+a {
+ color: #8e3557;
text-decoration: none;
}
+a:hover {
+ color: #88a33e;
+}
+
+h1:hover :after,
+h2:hover :after,
+h3:hover :after,
+h4:hover :after,
+h5:hover :after,
+h6:hover :after {
+ content: " \2191";
+}
+
pre {
margin-bottom: 24px;
line-height: 1.2em;
@@ -103,19 +119,58 @@ code {
}
ul, ol {
+ list-style-position: inside;
+ padding-left: 1em;
+ text-indent: -1em;
+ margin-left: 0;
margin-bottom: 24px;
}
+li + li {
+ margin-top: 0.1em;
+}
+
ul ul,
ol ol {
margin: 0 0 0 24px;
}
+table {
+ width: 100%;
+ margin-bottom: 24px;
+}
+
+th {
+ color: #555;
+ font-family: 'Droid Sans', sans-serif;
+ font-weight: bold;
+ border-bottom: 1px dotted #bbb;
+}
+
+td, th {
+ padding: 2px;
+}
+
+dl {
+ margin-bottom: 24px;
+}
+
+dt {
+ font-style: italic;
+}
+
+dd {
+ margin-top: 12px;
+ padding-left: 1em;
+}
+
.title {
font-size: xx-large;
+ color: #555;
}
.author {
font-size: 1.25em;
font-weight: normal;
+ color: #555;
}