Commit 3cced022 authored by Taddeus Kroes's avatar Taddeus Kroes

Added a usage example.

parent f93df800
...@@ -458,10 +458,39 @@ events. ...@@ -458,10 +458,39 @@ events.
\section{Example usage} \section{Example usage}
% TODO This section describes an example that illustrates the communication
% vertellen hoe je tracker aanmaakt, binnen een window between different components. The example application listens to tap events
in a GUI window.
%\section{Network protocol}
\begin{verbatim}
# Create a gesture server that will be started later
server = new GestureServer object
# Add a new window to the server, representing the GUI
window = new Window object
set window position and size to that of GUIO window
add window to server
# Define a handler that must be triggered when a tap gesture is detected
begin function handler(gesture)
# Do something
end function
# Create a tracker that detects tap gestures
tracker = new TapTracker object # Where TapTracker is an implementation of
# abstract Tracker
add tracker tot window
bind handler to tracker.tap
# If the GUI toolkit allows it, bind window movement and resize handlers
# that alter the position size and sieze of the window object
# Start the gesture server (which in turn starts a driver-specific event
# server)
start server
\end{verbatim}
\section{Network protocol}
% TODO % TODO
% ZeroMQ gebruiken voor communicatie tussen meerdere processen (in % ZeroMQ gebruiken voor communicatie tussen meerdere processen (in
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment