-#ifndef __DALI_INTERNAL_ACTOR_GESTURE_DATA_H__
-#define __DALI_INTERNAL_ACTOR_GESTURE_DATA_H__
+#ifndef DALI_INTERNAL_ACTOR_GESTURE_DATA_H
+#define DALI_INTERNAL_ACTOR_GESTURE_DATA_H
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
// INTERNAL INCLUDES
-#include <dali/internal/event/events/pan-gesture-detector-impl.h>
-#include <dali/internal/event/events/pinch-gesture-detector-impl.h>
-#include <dali/internal/event/events/long-press-gesture-detector-impl.h>
-#include <dali/internal/event/events/tap-gesture-detector-impl.h>
+#include <dali/internal/event/events/gesture-detector-impl.h>
namespace Dali
{
return type & gesturesRequired;
}
+ /**
+ * Retrieve a reference to the detectors for the given type.
+ * @param[in] type The container type required
+ * @pre Ensure IsGestureRequired() is used to check if the container is actually available.
+ */
+ GestureDetectorContainer& GetGestureDetectorContainer( Gesture::Type type );
+
+private:
+
+ /**
+ * Helper to retrieve the appropriate container type.
+ * @param[in] type The container type required.
+ */
+ inline GestureDetectorContainer*& GetContainerPtr( Gesture::Type type );
+
private:
Gesture::Type gesturesRequired; ///< Stores which gestures are required
- PanGestureDetectorContainer* panDetectors; ///< Pointer to a container of pan-detectors
- PinchGestureDetectorContainer* pinchDetectors; ///< Pointer to a container of pinch-detectors
- LongPressGestureDetectorContainer* longPressDetectors; ///< Pointer to a container of long-press-detectors
- TapGestureDetectorContainer* tapDetectors; ///< Pointer to a container of tap-detectors
+ GestureDetectorContainer* panDetectors; ///< Pointer to a container of pan-detectors
+ GestureDetectorContainer* pinchDetectors; ///< Pointer to a container of pinch-detectors
+ GestureDetectorContainer* longPressDetectors; ///< Pointer to a container of long-press-detectors
+ GestureDetectorContainer* tapDetectors; ///< Pointer to a container of tap-detectors
};
} // namespace Internal
} // namespace Dali
-#endif // __DALI_INTERNAL_ACTOR_GESTURE_DATA_H__
+#endif // DALI_INTERNAL_ACTOR_GESTURE_DATA_H