|
|
@@ -2,7 +2,7 @@
|
|
|
|
|
|
\usepackage[english]{babel}
|
|
|
\usepackage[utf8]{inputenc}
|
|
|
-\usepackage{hyperref,graphicx,tikz,subfigure,float}
|
|
|
+\usepackage{hyperref,graphicx,tikz,subfigure,float,lipsum}
|
|
|
|
|
|
% Link colors
|
|
|
\hypersetup{colorlinks=true,linkcolor=black,urlcolor=blue,citecolor=DarkGreen}
|
|
|
@@ -437,56 +437,63 @@ goal is to test the effectiveness of the design and detect its shortcomings.
|
|
|
propagation}. To reserve an event for a particular gesture, a gesture
|
|
|
tracker can stop its propagation. When propagation of an event is stopped,
|
|
|
it will not be passed on the ancestor areas, thus reserving the event.
|
|
|
- Figure \ref{fig:eventpropagation} illustrates the use of event propagation,
|
|
|
- applied to the example of the white and gray squares.
|
|
|
-
|
|
|
- \eventpropagationfigure
|
|
|
+ The diagram in appendix \ref{app:eventpropagation} illustrates the use of
|
|
|
+ event propagation, applied to the example of the white and gray squares.
|
|
|
|
|
|
\section{Serving multiple applications}
|
|
|
\label{sec:multiple-applications}
|
|
|
|
|
|
- % TODO
|
|
|
- \emph{TODO}
|
|
|
+ The design of the architecture is essentially complete with the components
|
|
|
+ specified in this chapter. However, one specification has not yet been
|
|
|
+ discussed: the ability address the architecture using a method of
|
|
|
+ communication independent of the application programming language.
|
|
|
+
|
|
|
+ If an application must start the architecture instance in a thread within
|
|
|
+ the application itself, the architecture is required to be compatible with
|
|
|
+ the programming language used to write the application. To overcome the
|
|
|
+ language barrier, an instance of the architecture would have to run in a
|
|
|
+ separate process.
|
|
|
+
|
|
|
+ A common and efficient way of communication between two separate processes
|
|
|
+ is through the use of a network protocol. In this particular case, the
|
|
|
+ architecture can run as a daemon\footnote{``daemon'' is a name Unix uses to
|
|
|
+ indicate that a process runs as a background process.} process, listening
|
|
|
+ to driver messages and triggering gestures in registered applications.
|
|
|
+
|
|
|
+ An advantage of a daemon setup is that is can serve multiple applications
|
|
|
+ at the same time. Alternatively, each application that uses gesture
|
|
|
+ interaction would start its own instance of the architecture in a separate
|
|
|
+ process, which would be less efficient.
|
|
|
|
|
|
\section{Example usage}
|
|
|
\label{sec:example}
|
|
|
|
|
|
- This section describes an example that illustrates the API of the
|
|
|
- architecture. The example application listens to tap events on a button.
|
|
|
- The button is located inside an application window, which can be resized
|
|
|
- using pinch gestures.
|
|
|
-
|
|
|
- % TODO: comments weg, in pseudocode opschrijven, uitbreiden met draggable
|
|
|
- % circle en illustrerende figuur
|
|
|
- \begin{verbatim}
|
|
|
- initialize GUI, creating a window
|
|
|
+ This section describes an extended example to illustrate the data flow of
|
|
|
+ the architecture. The example application listens to tap events on a button
|
|
|
+ within an application window. The window also contains a draggable circle.
|
|
|
+ The application window can be resized using \emph{pinch} gestures. Figure
|
|
|
+ \ref{fig:examplediagram} shows the architecture created by the pseudo code
|
|
|
+ below.
|
|
|
|
|
|
- create a root area with the position and size of the application window
|
|
|
- create an area with the position and size of the button
|
|
|
+\begin{verbatim}
|
|
|
+initialize GUI framework, creating a window and nessecary GUI widgets
|
|
|
|
|
|
- create a new event server
|
|
|
- set 'rootwidget' as root widget for 'server'
|
|
|
+create a root area that synchronizes position and size with the application window
|
|
|
+define 'rotation' gesture handler and bind it to the root area
|
|
|
|
|
|
- # Define handlers and bind them to corresponding widgets
|
|
|
- begin function resize_handler(gesture)
|
|
|
- resize GUI window
|
|
|
- update position and size of root wigdet
|
|
|
- end function
|
|
|
+create an area with the position and radius of the circle
|
|
|
+define 'drag' gesture handler and bind it to the circle area
|
|
|
|
|
|
- begin function tap_handler_handler(gesture)
|
|
|
- # Perform some action that the button is meant to do
|
|
|
- end function
|
|
|
+create an area with the position and size of the button
|
|
|
+define 'tap' gesture handler and bind it to the button area
|
|
|
|
|
|
- bind ('pinch', resize_handler) to rootwidget
|
|
|
- bind ('tap', tap_handler) to buttonwidget
|
|
|
+create a new event server and assign the created root area to it
|
|
|
|
|
|
- # Start event server (which in turn starts a driver-specific event server)
|
|
|
- start server
|
|
|
- \end{verbatim}
|
|
|
+start the event server in a new thread
|
|
|
+start the GUI main loop in the current thread
|
|
|
+\end{verbatim}
|
|
|
|
|
|
- \examplediagram{Diagram representation of the example above. Dotted arrows
|
|
|
- represent gestures, normal arrows represent events (unless labeled
|
|
|
- otherwise).}
|
|
|
+ \examplediagram
|
|
|
|
|
|
\chapter{Test applications}
|
|
|
|
|
|
@@ -496,6 +503,7 @@ goal is to test the effectiveness of the design and detect its shortcomings.
|
|
|
% TODO
|
|
|
% alleen window.contains op point down, niet move/up
|
|
|
% een paar simpele windows en trackers
|
|
|
+% Geen netwerk protocol
|
|
|
|
|
|
To test multi-touch interaction properly, a multi-touch device is required. The
|
|
|
University of Amsterdam (UvA) has provided access to a multi-touch table from
|
|
|
@@ -643,4 +651,9 @@ algorithms based on its test program.
|
|
|
Also, the different detection algorithms are all implemented in the same file,
|
|
|
making it complex to read or debug, and difficult to extend.
|
|
|
|
|
|
+\chapter{Diagram demonstrating event propagation}
|
|
|
+\label{app:eventpropagation}
|
|
|
+
|
|
|
+\eventpropagationfigure
|
|
|
+
|
|
|
\end{document}
|