[M120 Migration][NUI] Add internal mouse event API for NUI.
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / efl_integration / public / ewk_view_internal.h
index f7a8de7..cdf7866 100644 (file)
@@ -33,6 +33,8 @@
 #ifndef ewk_view_internal_h
 #define ewk_view_internal_h
 
+#include <stdbool.h>
+
 #include "ewk_app_installation_request_internal.h"
 #include "ewk_auth_challenge_internal.h"
 #include "ewk_context_internal.h"
@@ -150,6 +152,27 @@ enum Ewk_Top_Control_State {
 };
 typedef enum Ewk_Top_Control_State Ewk_Top_Control_State;
 
+enum Ewk_Mouse_Button_Type {
+  EWK_Mouse_Button_Left = 1,
+  EWK_Mouse_Button_Middle = 2,
+  EWK_Mouse_Button_Right = 3
+};
+typedef enum Ewk_Mouse_Button_Type Ewk_Mouse_Button_Type;
+
+typedef enum _EwkMediaDeviceType{
+  MEDIA_DEVICE_TYPE_AUDIO_INPUT,
+  MEDIA_DEVICE_TYPE_VIDEO_INPUT,
+  MEDIA_DEVICE_TYPE_AUDIO_OUTPUT,
+  NUM_MEDIA_DEVICE_TYPES,
+} EwkMediaDeviceType;
+
+typedef struct _EwkMediaDeviceInfo{
+   const char* device_id;
+   const char* label;
+   EwkMediaDeviceType type;
+   bool connected;
+} EwkMediaDeviceInfo;
+
 /// Ewk view's class, to be overridden by sub-classes.
 struct Ewk_View_Smart_Class {
     Evas_Smart_Class sc; /**< all but 'data' is free to be changed. */
@@ -278,6 +301,8 @@ typedef void (*Ewk_View_Scale_Changed_Callback)(Evas_Object *o, double scale_fac
  */
 typedef void (*Ewk_View_SmartRC_Mic_Notification_Callback)(Evas_Object *o, Eina_Bool show, void *user_data);
 
+typedef void (*Ewk_Media_Device_List_Get_Callback)(EwkMediaDeviceInfo* device_list, int size, void* user_data);
+
 /**
  * The version you have to put into the version field
  * in the @a Ewk_View_Smart_Class structure.
@@ -1422,6 +1447,89 @@ EXPORT_API void ewk_view_offscreen_rendering_enabled_set(Evas_Object* o, Eina_Bo
  */
 EXPORT_API void ewk_view_ime_window_set(Evas_Object* o, void* window);
 
+/**
+ * Sends mouse down event.
+ *
+ * @since_tizen 6.0
+ *
+ * @param[in] o view object
+ * @param[in] button button type
+ * @param[in] x horizontal position of mouse event
+ * @param[in] y vertical position of mouse event
+ */
+EXPORT_API void ewk_view_feed_mouse_down(Evas_Object* o,
+                                         Ewk_Mouse_Button_Type button,
+                                         int x,
+                                         int y);
+
+/**
+ * Sends mouse up event.
+ *
+ * @since_tizen 6.0
+ *
+ * @param[in] o view object
+ * @param[in] button button type
+ * @param[in] x horizontal position of mouse event
+ * @param[in] y vertical position of mouse event
+ */
+EXPORT_API void ewk_view_feed_mouse_up(Evas_Object* o,
+                                       Ewk_Mouse_Button_Type button,
+                                       int x,
+                                       int y);
+
+/**
+ * Sends mouse move event.
+ *
+ * @since_tizen 6.0
+ *
+ * @param[in] o view object
+ * @param[in] x horizontal position of mouse event
+ * @param[in] y vertical position of mouse event
+ */
+EXPORT_API void ewk_view_feed_mouse_move(Evas_Object* o, int x, int y);
+
+/**
+ * Sends mouse wheel event.
+ *
+ * @since_tizen 6.0
+ *
+ * @param[in] o view object
+ * @param[in] y_direction wheel mouse direction
+ * @param[in] step how much mouse wheel was scrolled up or down
+ * @param[in] x horizontal position of mouse event
+ * @param[in] y vertical position of mouse event
+ */
+EXPORT_API void ewk_view_feed_mouse_wheel(Evas_Object* o,
+                                          Eina_Bool y_direction,
+                                          int step,
+                                          int x,
+                                          int y);
+
+/**
+ * Sends mouse out event.
+ *
+ * @since_tizen 6.0
+ *
+ * @param[in] o view object
+ */
+EXPORT_API void ewk_view_feed_mouse_out(Evas_Object* o);
+
+/**
+ * @brief Sends key event.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] o The view object
+ * @param[in] key_event Evas_Event_Key_Down struct or Evas_Event_Key_Up struct
+ * @param[in] is_press EINA_TRUE: keydown, EINA_FALSE: keyup
+ * @return @c EINA_TRUE on success, otherwise @c EINA_FALSE
+ */
+EXPORT_API Eina_Bool ewk_view_send_key_event(Evas_Object* o,
+                                             void* key_event,
+                                             Eina_Bool is_press);
+
+EXPORT_API void ewk_view_media_device_list_get(Evas_Object* o, Ewk_Media_Device_List_Get_Callback callback, void* user_data);
+
 #ifdef __cplusplus
 }
 #endif