• Main Page
  • Modules
  • Data Structures
  • Files
  • File List

/build/buildd/utouch-geis-1.0.11/geis/geis.h

00001 
00020 #ifndef GEIS_GEIS_H_
00021 #define GEIS_GEIS_H_
00022 
00023 #define GEIS_VERSION_1_0  1
00024 
00025 #include <geis/geisimpl.h>
00026 
00027 /* Standard fundamental gestures */
00028 #define GEIS_GESTURE_DRAG    "Drag"
00029 #define GEIS_GESTURE_PINCH   "Pinch"
00030 #define GEIS_GESTURE_ROTATE  "Rotate"
00031 #define GEIS_GESTURE_TAP     "Tap"
00032 
00033 /* Gesture names for the Simplified Interface */
00034 #define GEIS_GESTURE_TYPE_DRAG1   "Drag,touch=1"
00035 #define GEIS_GESTURE_TYPE_DRAG2   "Drag,touch=2"
00036 #define GEIS_GESTURE_TYPE_DRAG3   "Drag,touch=3"
00037 #define GEIS_GESTURE_TYPE_DRAG4   "Drag,touch=4"
00038 #define GEIS_GESTURE_TYPE_DRAG5   "Drag,touch=5"
00039 #define GEIS_GESTURE_TYPE_PINCH1  "Pinch,touch=1"
00040 #define GEIS_GESTURE_TYPE_PINCH2  "Pinch,touch=2"
00041 #define GEIS_GESTURE_TYPE_PINCH3  "Pinch,touch=3"
00042 #define GEIS_GESTURE_TYPE_PINCH4  "Pinch,touch=4"
00043 #define GEIS_GESTURE_TYPE_PINCH5  "Pinch,touch=5"
00044 #define GEIS_GESTURE_TYPE_ROTATE1 "Rotate,touch=1"
00045 #define GEIS_GESTURE_TYPE_ROTATE2 "Rotate,touch=2"
00046 #define GEIS_GESTURE_TYPE_ROTATE3 "Rotate,touch=3"
00047 #define GEIS_GESTURE_TYPE_ROTATE4 "Rotate,touch=4"
00048 #define GEIS_GESTURE_TYPE_ROTATE5 "Rotate,touch=5"
00049 #define GEIS_GESTURE_TYPE_TAP1    "Tap,touch=1"
00050 #define GEIS_GESTURE_TYPE_TAP2    "Tap,touch=2"
00051 #define GEIS_GESTURE_TYPE_TAP3    "Tap,touch=3"
00052 #define GEIS_GESTURE_TYPE_TAP4    "Tap,touch=4"
00053 #define GEIS_GESTURE_TYPE_TAP5    "Tap,touch=5"
00054 
00055 /* Standard fundamental gesture attributes */
00056 #define GEIS_GESTURE_ATTRIBUTE_ANGLE            "angle"
00057 #define GEIS_GESTURE_ATTRIBUTE_ANGLE_DELTA      "angle delta"
00058 #define GEIS_GESTURE_ATTRIBUTE_ANGULAR_VELOCITY "angular velocity"
00059 #define GEIS_GESTURE_ATTRIBUTE_BOUNDINGBOX_X1   "boundingbox x1"
00060 #define GEIS_GESTURE_ATTRIBUTE_BOUNDINGBOX_Y1   "boundingbox y1"
00061 #define GEIS_GESTURE_ATTRIBUTE_BOUNDINGBOX_X2   "boundingbox x2"
00062 #define GEIS_GESTURE_ATTRIBUTE_BOUNDINGBOX_Y2   "boundingbox y2"
00063 #define GEIS_GESTURE_ATTRIBUTE_CHILD_WINDOW_ID  "child window id"
00064 #define GEIS_GESTURE_ATTRIBUTE_DELTA_X          "delta x"
00065 #define GEIS_GESTURE_ATTRIBUTE_DELTA_Y          "delta y"
00066 #define GEIS_GESTURE_ATTRIBUTE_DEVICE_ID        "device id"
00067 #define GEIS_GESTURE_ATTRIBUTE_EVENT_WINDOW_ID  "event window id"
00068 #define GEIS_GESTURE_ATTRIBUTE_FOCUS_X          "focus x"
00069 #define GEIS_GESTURE_ATTRIBUTE_FOCUS_Y          "focus y"
00070 #define GEIS_GESTURE_ATTRIBUTE_GESTURE_NAME     "gesture name"
00071 #define GEIS_GESTURE_ATTRIBUTE_POSITION_X       "position x"
00072 #define GEIS_GESTURE_ATTRIBUTE_POSITION_Y       "position y"
00073 #define GEIS_GESTURE_ATTRIBUTE_RADIAL_VELOCITY  "radial velocity"
00074 #define GEIS_GESTURE_ATTRIBUTE_RADIUS_DELTA     "radius delta"
00075 #define GEIS_GESTURE_ATTRIBUTE_RADIUS           "radius"
00076 #define GEIS_GESTURE_ATTRIBUTE_ROOT_WINDOW_ID   "root window id"
00077 #define GEIS_GESTURE_ATTRIBUTE_TAP_TIME         "tap time"
00078 #define GEIS_GESTURE_ATTRIBUTE_TIMESTAMP        "timestamp"
00079 #define GEIS_GESTURE_ATTRIBUTE_TOUCHES          "touches"
00080 #define GEIS_GESTURE_ATTRIBUTE_VELOCITY_X       "velocity x"
00081 #define GEIS_GESTURE_ATTRIBUTE_VELOCITY_Y       "velocity y"
00082 #define GEIS_GESTURE_ATTRIBUTE_TOUCH_0_ID       "touch 0 id"
00083 #define GEIS_GESTURE_ATTRIBUTE_TOUCH_0_X        "touch 0 x"
00084 #define GEIS_GESTURE_ATTRIBUTE_TOUCH_0_Y        "touch 0 y"
00085 #define GEIS_GESTURE_ATTRIBUTE_TOUCH_1_ID       "touch 1 id"
00086 #define GEIS_GESTURE_ATTRIBUTE_TOUCH_1_X        "touch 1 x"
00087 #define GEIS_GESTURE_ATTRIBUTE_TOUCH_1_Y        "touch 1 y"
00088 #define GEIS_GESTURE_ATTRIBUTE_TOUCH_2_ID       "touch 2 id"
00089 #define GEIS_GESTURE_ATTRIBUTE_TOUCH_2_X        "touch 2 x"
00090 #define GEIS_GESTURE_ATTRIBUTE_TOUCH_2_Y        "touch 2 y"
00091 #define GEIS_GESTURE_ATTRIBUTE_TOUCH_3_ID       "touch 3 id"
00092 #define GEIS_GESTURE_ATTRIBUTE_TOUCH_3_X        "touch 3 x"
00093 #define GEIS_GESTURE_ATTRIBUTE_TOUCH_3_Y        "touch 3 y"
00094 #define GEIS_GESTURE_ATTRIBUTE_TOUCH_4_ID       "touch 4 id"
00095 #define GEIS_GESTURE_ATTRIBUTE_TOUCH_4_X        "touch 4 x"
00096 #define GEIS_GESTURE_ATTRIBUTE_TOUCH_4_Y        "touch 4 y"
00097 
00110 typedef enum GeisStatus
00111 {
00112   GEIS_STATUS_SUCCESS       = 0,    
00113   GEIS_STATUS_NOT_SUPPORTED = 10,   
00114   GEIS_BAD_ARGUMENT         = 1000, 
00115   GEIS_UNKNOWN_ERROR        = 9999  
00116 } GeisStatus;
00117 
00118 /* @} */
00119 
00142 typedef struct _GeisInstance *GeisInstance;
00143 
00148 typedef struct GeisWinInfo
00149 {
00150   uint32_t win_type;
00151   void    *win_info;
00152 } GeisWinInfo;
00153 
00165 GEIS_API GeisStatus geis_init(GeisWinInfo *win_info, GeisInstance *geis_instance);
00166 
00176 GEIS_API GeisStatus geis_finish(GeisInstance  geis_instance);
00177 
00178 /* @} */
00179 
00185 #define GEIS_CONFIG_UNIX_FD 10001
00186 
00196 GEIS_API GeisStatus geis_configuration_supported(GeisInstance geis_instance,
00197                                                  int          configuration_item);
00198 
00208 GEIS_API GeisStatus geis_configuration_get_value(GeisInstance geis_instance, 
00209                                                  int          configuration_item,
00210                                                  void         *value);
00211 
00221 GEIS_API GeisStatus geis_configuration_set_value(GeisInstance geis_instance,
00222                                                  int          configuration_item, 
00223                                                  void         *value);
00224 
00237 GEIS_API GeisStatus geis_event_dispatch(GeisInstance geis_instance);
00238 
00239 /* @} */
00240 
00241 typedef enum GeisAttrType
00242 {
00243   GEIS_ATTR_TYPE_UNKNOWN,
00244   GEIS_ATTR_TYPE_BOOLEAN,
00245   GEIS_ATTR_TYPE_FLOAT,
00246   GEIS_ATTR_TYPE_INTEGER,
00247   GEIS_ATTR_TYPE_STRING
00248 } GeisAttrType;
00249 
00255 typedef unsigned int GeisInputDeviceId;
00256 
00257 #define GEIS_ALL_INPUT_DEVICES ((GeisInputDeviceId)0)
00258 
00262 typedef void (*GeisInputCallback)(void             *cookie,
00263                                   GeisInputDeviceId device_id,
00264                                   void             *attrs);
00265 
00269 typedef struct GeisInputFuncs
00270 {
00271   GeisInputCallback  added;   
00272   GeisInputCallback  changed; 
00273   GeisInputCallback  removed; 
00275 } GeisInputFuncs;
00276 
00277 
00295 GEIS_API GeisStatus geis_input_devices(GeisInstance    geis_instance,
00296                                        GeisInputFuncs *func,
00297                                        void           *cookie);
00298 
00299 /* @} */
00300 
00305 typedef unsigned int GeisGestureType;
00306 typedef unsigned int GeisGestureId;
00307 
00308 #define GEIS_ALL_GESTURES ((GeisGestureType)0)
00309 #define GEIS_NO_GESTURE_ID ((GeisGestureId)0)
00310 
00314 typedef struct GeisGestureAttr
00315 {
00316   GeisString name;
00317   GeisAttrType type;
00318   union
00319   {
00320     GeisBoolean boolean_val;
00321     GeisFloat   float_val;
00322     GeisInteger integer_val;
00323     GeisString  string_val;
00324   };
00325 } GeisGestureAttr;
00326 
00336 typedef void (*GeisGestureCallback)(void             *cookie,
00337                                     GeisGestureType   gesture_type,
00338                                     GeisGestureId     gesture_id,
00339                                     GeisSize          attr_count,
00340                                     GeisGestureAttr  *attrs);
00341 
00345 typedef struct GeisGestureFuncs
00346 {
00347   GeisGestureCallback  added;
00348   GeisGestureCallback  removed;
00349   GeisGestureCallback  start;
00350   GeisGestureCallback  update;
00351   GeisGestureCallback  finish;
00352 } GeisGestureFuncs;
00353 
00354 
00370 GEIS_API GeisStatus geis_subscribe(GeisInstance         geis_instance,
00371                                    GeisInputDeviceId   *input_list,
00372                                    const char*         *gesture_list,
00373                                    GeisGestureFuncs    *funcs,
00374                                    void                *cookie);
00375 
00383 GEIS_API GeisStatus geis_unsubscribe(GeisInstance     geis_instance,
00384                                      GeisGestureType *gesture_list);
00385 
00386 /* @} */
00387 
00388 #endif /* GEIS_GEIS_H_ */

Generated on Sat Oct 2 2010 20:10:58 for GEIS by  doxygen 1.7.1