aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorTom Harley2021-11-14 05:50:32 +0000
committerTom Harley2021-11-14 05:50:32 +0000
commit7ad4630a292ee8f56fa885f10f2cc3b0215d7d90 (patch)
tree094fbaf4b3f5e20d244d17bbb77685d3a60533a9 /README.md
parentRefactor to match SDL2 code style (diff)
downloadsdl2_vnc-7ad4630a292ee8f56fa885f10f2cc3b0215d7d90.tar.gz
sdl2_vnc-7ad4630a292ee8f56fa885f10f2cc3b0215d7d90.zip

Add basic documentation

Add docstrings to all the features in SDL2_vnc.c.

Next step in documentation would be to add examples, like the ones that can be found on the SDL wiki.

Diffstat (limited to 'README.md')
-rw-r--r--README.md41
1 files changed, 41 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..2233985
--- /dev/null
+++ b/README.md
@@ -0,0 +1,41 @@
+SDL2_vnc: A companion library to SDL for working with VNC servers
+
+This library should be useful to anyone who wnats to display VNC connection
+output in a project using SDL2.
+
+The codebase also includes a barebones VNC client, `vncc`, that acts as a
+reference use of the library.
+
+# Building SDL2_vnc
+
+SDL2_vnc depends on SDL2, and so needs its headers available during building.
+
+```
+$ make
+$ make install
+```
+
+Individual targets are declared in the `Makefile`. For example, to only build
+SDL2_vnc as a shared library:
+
+```
+$ make SDL2_vnc.so
+```
+
+# Using SDL2_vnc
+
+Be sure to initialise the library using `VNC_Init` before using any of its
+functionality.
+
+To get a VNC connection to a server up and running:
+- allocate a `VNC_Connection`;
+- initialise it using `VNC_InitConnection`.
+From there, the surface containing the framebuffer data can be accessed at
+`vnc_connection.surface`.
+
+See `vncc.c` for a more thorough example use of the library.
+
+# Issues
+
+Issues can be raised in the GitLab project's issues. Alternatively, feel free to
+contact me at <mag@magnostherobot.co.uk>.