input_generator: add new APIs to generate axis events
[platform/core/api/efl-util.git] / include / efl_util.h.in
index 6b72fb7..61eb29d 100644 (file)
@@ -119,7 +119,7 @@ API int efl_util_set_notification_window_level(Evas_Object *window, efl_util_not
 API int efl_util_get_notification_window_level(Evas_Object *window, efl_util_notification_level_e *level);
 
 /**
- * @brief Sets the alpha window's visual state to opaque state
+ * @brief Sets the alpha window's visual state to opaque state.
  * @details This API sets the alpha window's visual state to opaque state.
  *          If the alpha window sets the visual state to the opaque,
  *          then the window manager could handle it as the opaque window while calculating visibility.
@@ -261,6 +261,17 @@ typedef enum
 } efl_util_input_pointer_type_e;
 
 /**
+ * @platform
+ * @brief Enumeration of pointer wheel event types.
+ * @since_tizen 5.5
+ */
+typedef enum
+{
+   EFL_UTIL_INPUT_POINTER_WHEEL_VERT, /**< Vertical wheel. */
+   EFL_UTIL_INPUT_POINTER_WHEEL_HORZ, /**< Horizontal wheel. */
+} efl_util_input_pointer_wheel_type_e;
+
+/**
    * @platform
    * @brief Initializes system and check input generate functions are supported, open devices generated events.
    * @since_tizen $TZ_CFG_VER_24_OR_30$
@@ -276,6 +287,7 @@ typedef enum
    * @exception #EFL_UTIL_ERROR_NO_SUCH_DEVICE No such device or address
    * @exception #EFL_UTIL_ERROR_INVALID_OPERATION Function not implemented
    * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
+   * @exception #EFL_UTIL_ERROR_PERMISSION_DENIED Has no permission to initialize input generator
    * @see efl_util_input_deinitialize_generator()
    */
 API efl_util_inputgen_h efl_util_input_initialize_generator(unsigned int dev_type);
@@ -297,6 +309,7 @@ API efl_util_inputgen_h efl_util_input_initialize_generator(unsigned int dev_typ
    * @exception #EFL_UTIL_ERROR_NO_SUCH_DEVICE No such device or address
    * @exception #EFL_UTIL_ERROR_INVALID_OPERATION Function not implemented
    * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
+   * @exception #EFL_UTIL_ERROR_PERMISSION_DENIED Has no permission to initialize input generator
    * @see efl_util_input_deinitialize_generator()
    */
 API efl_util_inputgen_h efl_util_input_initialize_generator_with_name(unsigned int dev_type, const char *name);
@@ -336,6 +349,7 @@ API efl_util_inputgen_h efl_util_input_initialize_generator_with_sync(unsigned i
    * @return @c 0 on success, otherwise a negative error value
    * @retval #EFL_UTIL_ERROR_NONE Successful
    * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
+   * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Has no permission to deinitialize input generator
    * @see efl_util_input_initialize_generator()
    */
 API int efl_util_input_deinitialize_generator(efl_util_inputgen_h inputgen_h);
@@ -376,13 +390,13 @@ API int efl_util_input_generate_touch(efl_util_inputgen_h inputgen_h, int idx, e
 
 /**
    * @platform
-   * @brief Generate a pointer event using a opened device.
+   * @brief Generates a pointer event using a opened device.
    * @since_tizen 3.0
    * @privlevel platform
    * @privilege %http://tizen.org/privilege/inputgenerator
    * @param[in] inputgen_h The #efl_util_inputgen_h handle
    * @param[in] buttons The number of button
-   * @param[in] pointer_type The pointer type (ex> EFL_UTIL_INPUT_POINTER_BUTTON_PRESS, EFL_UTIL_INPUT_POINTER_BUTTON_UP, EFL_UTIL_INPUT_POINTER_MOVE)
+   * @param[in] pointer_type The pointer type (ex> #EFL_UTIL_INPUT_POINTER_BUTTON_PRESS, #EFL_UTIL_INPUT_POINTER_BUTTON_UP, #EFL_UTIL_INPUT_POINTER_MOVE)
    * @param[in] x x coordination to move
    * @param[in] y y coordination to move
    * @return @c 0 on success, otherwise a negative error value
@@ -395,6 +409,67 @@ API int efl_util_input_generate_touch(efl_util_inputgen_h inputgen_h, int idx, e
 API int efl_util_input_generate_pointer(efl_util_inputgen_h inputgen_h, int buttons, efl_util_input_pointer_type_e pointer_type, int x, int y);
 
 /**
+   * @platform
+   * @brief Generates a wheel event using an opened device.
+   * @details Commonly wheel events are generated with one of two orientations, vertical and horizontal.
+   *          #efl_util_input_pointer_wheel_type_e has enums for orientations.
+   *          For each orientation there is a value which represents both size and direction.
+   *          For #EFL_UTIL_INPUT_POINTER_WHEEL_VERT, if the value is positive, the direction is "up", if it's negative, the direction is "down"
+   *          For #EFL_UTIL_INPUT_POINTER_WHEEL_HORZ, if the value is positive, the direction is "right", if it's negative, the direction is "left"
+   *          General mouse devices generate wheel events with value 1 or -1,
+   *          but some mouse devices have a smooth wheel which generates wheel events with value bigger than absolute 1.
+   * @since_tizen 5.5
+   * @privlevel platform
+   * @privilege %http://tizen.org/privilege/inputgenerator
+   * @param[in] inputgen_h The #efl_util_inputgen_h handle
+   * @param[in] wheel_type The wheel type (ex> #EFL_UTIL_INPUT_POINTER_WHEEL_VERT, #EFL_UTIL_INPUT_POINTER_WHEEL_HORZ)
+   * @param[in] value The wheel value
+   * @return @c 0 on success, otherwise a negative error value
+   * @retval #EFL_UTIL_ERROR_NONE Successful
+   * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
+   * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED No permission to generate a wheel event
+   * @retval #EFL_UTIL_ERROR_NO_SUCH_DEVICE No such device or address
+   * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
+   * @retval #EFL_UTIL_ERROR_NOT_SUPPORTED Not supported
+   */
+API int efl_util_input_generate_wheel(efl_util_inputgen_h inputgen_h, efl_util_input_pointer_wheel_type_e wheel_type, int value);
+
+/**
+   * @platform
+   * @brief Generates a touch event using an opened device.
+   * @details Normally touch events are represented by a specific point (x, y).
+   *          But there are many contact points between touchscreen and fingers.
+   *          The coordinates (x, y) are the center of the contact area, and the area where the finger and the touchscreen come into contact is represented with an ellipse.
+   *          To give information about the size of the touching cllipse, use @a radius_x and @a radius_y.
+   *          The value of @a idx is touch index used in multi-touch. 0 means first touch, 1 means second touch and the index increases further.
+   *          General devices support 10 touch indices(0 ~ 9), but this may differ depending on the device.
+   *          Some devices may not support the @a palm value, and this value is closely dependent on device.
+   *          The value of @a x, @a y, @a radius_x, @a radius_y, @a pressure and @a palm must be greater than 0.
+   *          The @a angle is the angle between the vertical edge of the device and the y-axis of the ellipse. If the @a angle is 0, then the ellipse's y-axis is parallel to the device's vertical edge.
+   * @since_tizen 5.5
+   * @privlevel platform
+   * @privilege %http://tizen.org/privilege/inputgenerator
+   * @param[in] inputgen_h The #efl_util_inputgen_h handle
+   * @param[in] idx The index of the touching finger, used in multi-touch
+   * @param[in] touch_type The touch type (ex> #EFL_UTIL_INPUT_TOUCH_BEGIN, #EFL_UTIL_INPUT_TOUCH_UPDATE, #EFL_UTIL_INPUT_TOUCH_END)
+   * @param[in] x The x coordinate of the touch point
+   * @param[in] y The y coordinate of the touch point
+   * @param[in] radius_x The x-axis radius of the touching ellipse before rotation
+   * @param[in] radius_y The y-axis radius of the touching ellipse before rotation
+   * @param[in] pressure The pressure on the contact touch area
+   * @param[in] angle The rotation angle of the touching ellipse, in degrees
+   * @param[in] palm The palm area of the contact touch area
+   * @return @c 0 on success, otherwise a negative error value
+   * @retval #EFL_UTIL_ERROR_NONE Successful
+   * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
+   * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED No permission to generate a touch event
+   * @retval #EFL_UTIL_ERROR_NO_SUCH_DEVICE No such device or address
+   * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
+   * @retval #EFL_UTIL_ERROR_NOT_SUPPORTED Not supported
+   */
+API int efl_util_input_generate_touch_axis(efl_util_inputgen_h inputgen_h, int idx, efl_util_input_touch_type_e touch_type, int x, int y, double radius_x, double radius_y, double pressure, double angle, double palm);
+
+/**
  * @}
  */
 
@@ -426,6 +501,7 @@ typedef struct _efl_util_screenshot_h * efl_util_screenshot_h;
  * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
  * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
  * @exception #EFL_UTIL_ERROR_SCREENSHOT_INIT_FAIL Initialization failure
+ * @exception #EFL_UTIL_ERROR_PERMISSION_DENIED No permission for screenshot
  * @see efl_util_screenshot_deinitialize()
  */
 API efl_util_screenshot_h efl_util_screenshot_initialize(int width, int height);
@@ -438,12 +514,13 @@ API efl_util_screenshot_h efl_util_screenshot_initialize(int width, int height);
  * @privilege %http://tizen.org/privilege/screenshot
  * @remarks The specific error code can be obtained using the get_last_result()
  *          The #tbm_surface_h must be free by caller
- * @param[in] screenshot efl_util_screenshot_h handle
+ * @param[in] screenshot #efl_util_screenshot_h handle
  * @return #tbm_surface_h on success, otherwise @c NULL
  * @retval #tbm_surface_h The TBM surface handle
  * @exception #EFL_UTIL_ERROR_NONE Successful
  * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
  * @exception #EFL_UTIL_ERROR_SCREENSHOT_EXECUTION_FAIL Execution failure
+ * @exception #EFL_UTIL_ERROR_PERMISSION_DENIED No permission for screenshot
  * @see efl_util_screenshot_initialize()
  * @see efl_util_screenshot_deinitialize()
  */
@@ -455,10 +532,11 @@ API tbm_surface_h efl_util_screenshot_take_tbm_surface(efl_util_screenshot_h scr
  * @since_tizen $TZ_CFG_VER_24_OR_30$
  * @privlevel platform
  * @privilege %http://tizen.org/privilege/screenshot
- * @param[in]  screenshot  efl_util_screenshot_h handle
+ * @param[in]  screenshot  #efl_util_screenshot_h handle
  * @return @c 0 on success, otherwise a negative error value
  * @retval #EFL_UTIL_ERROR_NONE Successful
  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED No permission for screenshot
  * @see efl_util_screenshot_initialize()
  */
 API int efl_util_screenshot_deinitialize(efl_util_screenshot_h screenshot);
@@ -503,7 +581,7 @@ API extern int EFL_UTIL_EVENT_GESTURE_TAP;
 API extern int EFL_UTIL_EVENT_GESTURE_PALM_COVER;
 
 /**
- * @brief Enumeration of gesture type
+ * @brief Enumeration of gesture type.
  * @since_tizen 4.0
  */
 typedef enum _efl_util_gesture_type_e
@@ -519,7 +597,7 @@ typedef enum _efl_util_gesture_type_e
 } efl_util_gesture_type_e;
 
 /**
- * @brief Enumeration of gesture mode
+ * @brief Enumeration of gesture mode.
  * @since_tizen 4.0
  */
 typedef enum _efl_util_gesture_mode_e
@@ -532,7 +610,7 @@ typedef enum _efl_util_gesture_mode_e
 } efl_util_gesture_mode_e;
 
 /**
- * @brief Enumeration of gesture edge
+ * @brief Enumeration of gesture edge.
  * @since_tizen 4.0
  */
 typedef enum _efl_util_gesture_edge_e
@@ -545,7 +623,7 @@ typedef enum _efl_util_gesture_edge_e
 } efl_util_gesture_edge_e;
 
 /**
- * @brief Enumeration of gesture edge size
+ * @brief Enumeration of gesture edge size.
  * @since_tizen 4.0
  */
 typedef enum _efl_util_gesture_edge_size_e
@@ -556,13 +634,13 @@ typedef enum _efl_util_gesture_edge_size_e
 } efl_util_gesture_edge_size_e;
 
 /**
- * @brief Definition for the gesture data handle
+ * @brief Definition for the gesture data handle.
  * @since_tizen 4.0
  */
 typedef void *efl_util_gesture_data;
 
 /**
- * @brief Definition for the edge swipe gesture's event data structure
+ * @brief Definition for the edge swipe gesture's event data structure.
  * @since_tizen 4.0
  */
 typedef struct _efl_util_event_gesture_edge_swipe_s
@@ -575,7 +653,7 @@ typedef struct _efl_util_event_gesture_edge_swipe_s
 } efl_util_event_gesture_edge_swipe_s;
 
 /**
- * @brief Definition for the edge drag gesture's event data structure
+ * @brief Definition for the edge drag gesture's event data structure.
  * @since_tizen 4.0
  */
 typedef struct efl_util_event_gesture_edge_drag_s
@@ -588,7 +666,7 @@ typedef struct efl_util_event_gesture_edge_drag_s
 } efl_util_event_gesture_edge_drag_s;
 
 /**
- * @brief Definition for the tap gesture's event data structure
+ * @brief Definition for the tap gesture's event data structure.
  * @since_tizen 4.0
  */
 typedef struct _efl_util_event_gesture_tap_s
@@ -599,7 +677,7 @@ typedef struct _efl_util_event_gesture_tap_s
 } efl_util_event_gesture_tap_s;
 
 /**
- * @brief Definition for the palm cover gesture's event data structure
+ * @brief Definition for the palm cover gesture's event data structure.
  * @since_tizen 4.0
  */
 typedef struct _efl_util_event_gesture_palm_cover_s