~oif-packaging/grail/raring

« back to all changes in this revision

Viewing changes to include/oif/grail.h

  • Committer: Chase Douglas
  • Date: 2012-06-21 20:30:14 UTC
  • mto: This revision was merged to the branch mainline in revision 234.
  • Revision ID: chase.douglas@ubuntu.com-20120621203014-g2uhy6mg779aufop
Rename utouch-grail to grail

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 *
3
 
 * utouch-grail - Multitouch Gesture Recognition Library
 
3
 * grail - Multitouch Gesture Recognition Library
4
4
 *
5
5
 * Copyright (C) 2010-2011 Canonical Ltd.
6
6
 *
20
20
 ****************************************************************************/
21
21
 
22
22
/**
23
 
 * @file utouch/grail.h
 
23
 * @file oif/grail.h
24
24
 * Definitions of the main and platform-generic API
25
25
 */
26
26
 
27
 
#ifndef UTOUCH_GRAIL_UTOUCH_GRAIL_H_
28
 
#define UTOUCH_GRAIL_UTOUCH_GRAIL_H_
 
27
#ifndef GRAIL_OIF_GRAIL_H_
 
28
#define GRAIL_OIF_GRAIL_H_
29
29
 
30
30
/* Macros that set symbol visibilities in shared libraries properly.
31
31
 * Adapted from http://gcc.gnu.org/wiki/Visibility
48
48
 
49
49
#include <stdint.h>
50
50
 
51
 
#include <utouch/frame.h>
 
51
#include <oif/frame.h>
52
52
 
53
53
#ifdef __cplusplus
54
54
extern "C" {
55
55
#endif
56
56
 
57
57
/**
58
 
 * @defgroup v3 uTouch-Grail 3.x
 
58
 * @defgroup v3 Grail 3.x
59
59
 * @{
60
60
 */
61
61
 
62
 
/** An object for the context of the uTouch Frame instance */
 
62
/** An object for the context of the grail instance */
63
63
typedef struct UGHandle_* UGHandle;
64
64
/** An object for a gesture subscription */
65
65
typedef struct UGSubscription_* UGSubscription;
200
200
   * Value type: int with boolean semantics
201
201
   * Default value: False
202
202
   *
203
 
   * The first version of uTouch-Grail supported only one gesture at a time.
204
 
   * When this property is true, uTouch-Grail will mimic this behavior. This
205
 
   * results in the following:
 
203
   * The first version of grail supported only one gesture at a time. When this
 
204
   * property is true, grail will mimic this behavior. This results in the
 
205
   * following:
206
206
   *
207
 
   * - The uTouch-Grail client must not attempt to accept or reject a gesture
 
207
   * - The grail client must not attempt to accept or reject a gesture
208
208
   * - If a gesture is active for a maximum of N touches, the addition of
209
209
   *   another touch will end the gesture. A new gesture is begun if another
210
210
   *   subscription's TouchesStart property equals the new number of touches.
214
214
   *   subscriptions for the window, UGStatusErrorAtomicity will be returned.
215
215
   * - Gestures from multiple subscriptions may be active at the same time.
216
216
   *
217
 
   * There is one key difference between uTouch-Grail v1 behavior and the use of
218
 
   * this option. The v1 behavior only supported one gesture per device. The use
219
 
   * of this option only supports one gesture per device per window. The
220
 
   * beginning of a gesture in a window does not inhibit gestures in other
221
 
   * windows. It also does not guarantee that there are no active touches
222
 
   * outside the window.
 
217
   * There is one key difference between grail v1 behavior and the use of this
 
218
   * option. The v1 behavior only supported one gesture per device. The use of
 
219
   * this option only supports one gesture per device per window. The beginning
 
220
   * of a gesture in a window does not inhibit gestures in other windows. It
 
221
   * also does not guarantee that there are no active touches outside the
 
222
   * window.
223
223
   */
224
224
  UGSubscriptionPropertyAtomicGestures,
225
225
} UGSubscriptionProperty;
397
397
/**
398
398
 * Create a new grail context
399
399
 *
400
 
 * @param [in] frame_handle The uTouch frame context object
401
 
 * @param [out] handle The new uTouch grail context object
 
400
 * @param [in] frame_handle The frame context object
 
401
 * @param [out] handle The new grail context object
402
402
 * @return UGStatusSuccess or UGStatusErrorResources
403
403
 */
404
404
GRAIL_PUBLIC
407
407
/**
408
408
 * Delete a grail context
409
409
 *
410
 
 * @param [in] handle The uTouch Grail context object
 
410
 * @param [in] handle The grail context object
411
411
 */
412
412
GRAIL_PUBLIC
413
413
void grail_delete_v3(UGHandle handle);
414
414
 
415
415
/**
416
 
 * Get the event file descriptor for the uTouch Frame context
 
416
 * Get the event file descriptor for the frame context
417
417
 *
418
 
 * @param [in] handle The uTouch Grail context object
 
418
 * @param [in] handle The grail context object
419
419
 * @return A file descriptor for the context
420
420
 *
421
421
 * When events are available for processing, the file descriptor will be
489
489
                                   UGSubscription subscription);
490
490
 
491
491
/**
492
 
 * Process a uTouch Frame event
 
492
 * Process a frame event
493
493
 *
494
494
 * @param [in] handle The context object
495
 
 * @param [in] event The uTouch Frame event
 
495
 * @param [in] event The frame event
496
496
 */
497
497
GRAIL_PUBLIC
498
498
void grail_process_frame_event(UGHandle handle, const UFEvent event);
499
499
 
500
500
/**
501
 
 * Get an event from the uTouch Grail context
 
501
 * Get an event from the grail context
502
502
 *
503
503
 * @param [in] handle The context object
504
504
 * @param [out] event The retrieved event
743
743
const UGTransform *grail_slice_get_cumulative_transform(const UGSlice slice);
744
744
 
745
745
/**
746
 
 * Get the uTouch-Frame frame for the slice
 
746
 * Get the frame frame for the slice
747
747
 *
748
748
 * @param [in] slice The gesture slice object
749
749
 * @return the frame
768
768
}
769
769
#endif
770
770
 
771
 
#endif // UTOUCH_GRAIL_UTOUCH_GRAIL_H_
 
771
#endif // GRAIL_OIF_GRAIL_H_