1 /*
2 * @(#)$Id:$
3 *
4 * Author : Ueli Kurmann, igesture@uelikurmann.ch
5 *
6 *
7 * Purpose :
8 *
9 * -----------------------------------------------------------------------
10 *
11 * Revision Information:
12 *
13 * Date Who Reason
14 *
15 * 30.11.2008 ukurmann Initial Release
16 *
17 * -----------------------------------------------------------------------
18 *
19 * Copyright 1999-2009 ETH Zurich. All Rights Reserved.
20 *
21 * This software is the proprietary information of ETH Zurich.
22 * Use is subject to license terms.
23 *
24 */
25
26
27 package org.ximtec.igesture.io;
28
29 import java.util.List;
30
31 import org.ximtec.igesture.core.Gesture;
32
33
34 /**
35 * Comment
36 * @version 1.0 30.11.2008
37 * @author Ueli Kurmann
38 */
39 public interface GestureDevice<E, F> extends Device{
40
41 /**
42 * Initializes the device. After executing this method, gestures can be
43 * captured.
44 */
45 void init();
46
47
48 /**
49 * Disposes the device. After executing this method, gestures are not captured
50 * anymore and all dependent resources are released.
51 */
52 void dispose();
53
54
55 /**
56 * Returns the gestures. This method should block, if no gesture is available.
57 * @return the gesture.
58 */
59 Gesture<E> getGesture();
60
61
62 /**
63 * Deletes the current gesture.
64 */
65 void clear();
66
67
68 /**
69 * Returns chunks of a gesture while drawing it.
70 * @return chunks of a gesture.
71 */
72 List<F> getChunks();
73
74
75 /**
76 * Add a gesture handler
77 * @param listener
78 */
79 void addGestureHandler(GestureEventListener listener);
80
81
82 /**
83 * Remove a gesture handler
84 * @param listener
85 */
86 void removeGestureHandler(GestureEventListener listener);
87
88 }