SET(EXEC_PREFIX "\${prefix}")
SET(LIBDIR "\${prefix}/lib")
SET(INCLUDEDIR "\${prefix}/include")
+SET(EDJEDIR "${PREFIX}/share/edje")
SET(VERSION_MAJOR 1)
SET(VERSION "${VERSION_MAJOR}.0.0")
INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED
elementary evas ecore-imf ecore ecore-x ecore-input
- ewebkit appcore-efl ui-gadget dlog utilX)
+ ewebkit appcore-efl ui-gadget dlog utilX glib-2.0)
FIND_LIBRARY(LIB_GNUTLS gnutls)
FOREACH(flag ${pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
# enable constanct tbs as default tiled backingstore
#----------------------------------------------------
ADD_DEFINITIONS("-DLOG_TAG=\"elm-webview\"")
+ADD_DEFINITIONS("-DEDJEDIR=\"${EDJEDIR}\"")
#----------------------------------------------------
# set option for arm
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${VERSION})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} ${LIB_GNUTLS})
+# ewebview.edj
+ADD_CUSTOM_TARGET(ewebview.edj
+ COMMAND edje_cc ${CMAKE_SOURCE_DIR}/ewebview.edc ${CMAKE_BINARY_DIR}/ewebview.edj
+ DEPENDS ${CMAKE_SOURCE_DIR}/ewebview.edc
+ )
+ADD_DEPENDENCIES(${PROJECT_NAME} ewebview.edj)
+
#----------------------------------------------------
# install
#----------------------------------------------------
#INSTALL(FILES ${CMAKE_SOURCE_DIR}/TIZEN_ElementaryWebView_PG.h DESTINATION include/elementary-webview-0)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY)
INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION lib/pkgconfig)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/ewebview.edj DESTINATION ${EDJEDIR})
#----------------------------------------------------
# add sub directory
* @date 2010.10.14 Modified for doxygen
* @date 2010.10.16 Modified for doxygen
* @date 2011.12.02 Remove deprecated APIs
+ * @date 2012.02.08 Add new APIs
*/
/**
typedef Eina_Bool (*Elm_WebView_Scheme_Cb)(Evas_Object *obj, const char *uri);
/**
- * @fn Evas_Object *elm_webview_add(Evas_Object *parent, Eina_Bool tiled)
+ * @fn Evas_Object *elm_webview_add(Evas_Object *parent)
* @brief create a new webview and add the webview to a parent object.
*
* The major difference between an webview and an WebKit object is that mobile-device specific feature
* are provided or not. The webview supports panning, zooming and fitting contents and so on, while the WebKit object don't.
*
- * @remarks If you need to use ewk api provided by the WebKit object, you should get the WebKit object using elm_webview_webkit_get after creating the webview object.
+ * @remarks If you need to use ewk api provided by the WebKit object, you should get the WebKit object using elm_webview_webkit_view_get after creating the webview object.
*
* @param[in] parent The parent object that will contain webview object
- * @param[in] tiled The backingStore type. EINA_TRUE if you want to use tiled version (at the expense of memory, silky panning and zooming are enabled) EINA_FALSE to disable tiled backingstore.
* @return The newly created object is returned. NULL if it failed to create one.
*
*/
-EAPI Evas_Object *elm_webview_add(Evas_Object *parent, Eina_Bool tiled);
+EAPI Evas_Object *elm_webview_add(Evas_Object *parent, ... );
/**
* @fn Evas_Object *elm_webview_webkit_get(Evas_Object *obj)
* @param[in] obj An WebView object
* @return The WebKit object or NULL on errors
*/
-EAPI Evas_Object *elm_webview_webkit_get(Evas_Object *obj);
+EINA_DEPRECATED Evas_Object *elm_webview_webkit_get(Evas_Object *obj);
+
+/**
+ * @fn Evas_Object *elm_webview_webkit_view_get(Evas_Object *obj)
+ * @brief Get the webkit object to call ewk API directly for fine control.
+ *
+ * @param[in] obj An WebView object
+ * @return The WebKit object or NULL on errors
+ */
+EAPI Evas_Object *elm_webview_webkit_view_get(Evas_Object *obj);
/**
* @fn void elm_webview_events_feed_set(Evas_Object *obj, Eina_Bool feed)
* @brief Get the current value of the property of event feeding
*
* @param[in] obj The WebView object
- * @return Eina_True if feeding event property is enabled, otherwise EINA_FALSE is returned.
+ * @return EINA_TRUE if feeding event property is enabled, otherwise EINA_FALSE is returned.
*/
EAPI Eina_Bool elm_webview_events_feed_get(Evas_Object *obj);
* @brief get the property value for fitting rendered web page content to device screen width right after web page loading.
*
* @param[in] obj An WebView object
- * @return Eina_True when auto fitting is enabled, otherwise EINA_FALSE.
+ * @return EINA_TRUE when auto fitting is enabled, otherwise EINA_FALSE.
*/
EAPI Eina_Bool elm_webview_auto_fitting_get(Evas_Object *obj);
EAPI void elm_webview_uri_set(Evas_Object *obj, const char *uri);
/**
+ * @fn const char *elm_webview_uri_get(const Evas_Object *obj)
+ * @brief Get the current uri loaded
+ *
+ * @param[in] obj An WebView object
+ * @return The current uri or NULL on errors
+ */
+EAPI const char *elm_webview_uri_get(const Evas_Object *obj);
+
+/**
* @fn void elm_webview_scheme_callback_set(Evas_Object *obj, const char *scheme, Elm_WebView_Scheme_Cb func)
* @brief Add callback to handle schemes.
*
EAPI void elm_webview_input_field_zoom_set(Evas_Object* obj, Eina_Bool zoom);
/**
+ * @fn Eina_Bool elm_webview_input_field_zoom_get(Evas_Object* obj)
+ * @brief Get the property for the input field zoom effect
+ *
+ * @param [in] obj The WebView object
+ * @return Eina_TRUE when the input field zoom effect is enabled, otherwise EINA_FALSE.
+ */
+EAPI Eina_Bool elm_webview_input_field_zoom_get(Evas_Object* obj);
+
+/**
* @fn void elm_webview_auto_suspend_set(Evas_Object* obj, Eina_Bool auto_suspend)
* @brief turn on/off the auto suspend during panning/zooming for achieving silky panning and zooming
*
EAPI void elm_webview_auto_suspend_set(Evas_Object* obj, Eina_Bool auto_suspend);
/**
+ * @fn void elm_webview_pause(Evas_Object* obj)
+ * @brief Pause the webview operation: javascript, network, rendering, etc.
+ *
+ * @param [in] obj The WebView object
+ */
+EAPI void elm_webview_pause(Evas_Object* obj);
+
+/**
+ * @fn void elm_webview_resume(Evas_Object* obj)
+ * @brief Resume the webview operation: javascript, network, rendering, etc.
+ *
+ * @param [in] obj The WebView object
+ */
+EAPI void elm_webview_resume(Evas_Object* obj);
+
+/**
* @fn void elm_webview_enable_default_context_menu_set(Evas_Object* obj, Eina_Bool enable)
* @brief Set the property for an webview object to show default context menu items.
*
* @param[in] obj An WebView object
* @param[in] enable a boolean to enable/disable default value
*/
-EAPI void elm_webview_enable_default_context_menu_set(Evas_Object* obj, Eina_Bool enable);
+EINA_DEPRECATED void elm_webview_enable_default_context_menu_set(Evas_Object* obj, Eina_Bool enable);
/**
* @fn Eina_Bool elm_webview_enable_default_context_menu_get(Evas_Object* obj)
* @brief Get the property for the webview object to show default context menu.
*
* @param[in] obj The WebView object
- * @return Eina_True When default context menu is enabled, otherwise EINA_FALSE.
+ * @return EINA_TRUE When default context menu is enabled, otherwise EINA_FALSE.
*/
-EAPI Eina_Bool elm_webview_enable_default_context_menu_get(Evas_Object* obj);
+EINA_DEPRECATED Eina_Bool elm_webview_enable_default_context_menu_get(Evas_Object* obj);
/**
* @fn void elm_webview_context_menu_item_selected(Evas_Object* obj, Ewk_Context_Menu_Item* webkit_context_menu_item);
EAPI void elm_webview_horizontal_panning_hold_set(Evas_Object* obj, Eina_Bool hold);
/**
+ * @fn Eina_Bool elm_webview_horizontal_panning_hold_get(Evas_Object* obj);
+ * @brief Get hold/unhold horizontal panning status.
+ *
+ * @param[in] obj The WebView object
+ * @return EINA_TRUE When horizontal panning hold set is enabled, otherwise EINA_FALSE.
+ */
+EAPI Eina_Bool elm_webview_horizontal_panning_hold_get(Evas_Object* obj);
+
+/**
* @fn void elm_webview_vertical_panning_hold_set(Evas_Object* obj, Eina_Bool hold);
* @brief hold/unhold vertical panning.
* vertical panning will be stopped during hold, and will be done during unhold.
* vertical panning will be stopped during hold, and will be done during unhold.
*
* @param[in] obj The WebView object
- * @return Eina_True When vertical panning hold set is enabled, otherwise EINA_FALSE.
+ * @return EINA_TRUE When vertical panning hold set is enabled, otherwise EINA_FALSE.
*/
EAPI Eina_Bool elm_webview_vertical_panning_hold_get(Evas_Object* obj);
*/
EAPI void elm_webview_show_magnifier_set(Evas_Object *obj, Eina_Bool enable);
+/**
+ * @fn Eina_Bool elm_webview_back(Evas_Object *obj)
+ * @brief Go back in the history.
+ *
+ * @param[in] obj An WebView object
+ * @return EINA_TRUE on success or EINA_FALSE otherwise
+ */
+EAPI Eina_Bool elm_webview_back(Evas_Object *obj);
+
+/**
+ * @fn Eina_Bool elm_webview_back_possible(Evas_Object *obj)
+ * @brief Query if it's possible to navigate backward one item in the history
+ *
+ * @param[in] obj An WebView object
+ * @return EINA_TRUE if it's possible to navigate backward one item in the history, EINA_FALSE otherwise
+ */
+EAPI Eina_Bool elm_webview_back_possible(Evas_Object *obj);
+
+/**
+ * @fn Eina_Bool elm_webview_forward(Evas_Object *obj)
+ * @brief Go forward in the history.
+ *
+ * @param[in] obj An WebView object
+ * @return EINA_TRUE on success or EINA_FALSE otherwise
+ */
+EAPI Eina_Bool elm_webview_forward(Evas_Object *obj);
+
+/**
+ * @fn Eina_Bool elm_webview_forward_possible(Evas_Object *obj)
+ * @brief Query if it's possible to navigate forward one item in the history
+ *
+ * @param[in] obj An WebView object
+ * @return EINA_TRUE if it's possible to navigate forward one item in the history, EINA_FALSE otherwise
+ */
+EAPI Eina_Bool elm_webview_forward_possible(Evas_Object *obj);
+
+/**
+ * @fn Eina_Bool elm_webview_navigate(Evas_Object *obj, int steps)
+ * @brief Navigate back or forward in the history.
+ *
+ * @param[in] obj An WebView object
+ * @param[in] steps If positive navigates that amount forwards, if negative does backwards
+ * @return EINA_TRUE on success or EINA_FALSE otherwise
+ */
+EAPI Eina_Bool elm_webview_navigate(Evas_Object *obj, int steps);
+
+/**
+ * @fn Eina_Bool elm_webview_navigate_possible(Evas_Object *obj, int steps)
+ * @brief Query if it's possible to navigate given @a steps in the history.
+ *
+ * @param[in] obj An WebView object
+ * @return EINA_TRUE if it's possible to navigate @a steps in the history, EINA_FALSE otherwise
+ */
+EAPI Eina_Bool elm_webview_navigate_possible(Evas_Object *obj, int steps);
+
+/**
+ * @fn Eina_Bool elm_webview_contents_set(Evas_Object *obj, const char *contents, size_t contents_size, const char *mime_type, const char *encoding, const char *base_uri)
+ * @brief Request to load the given contents
+ *
+ * @param[in] obj An WebView object
+ * @param[in] contents Contents to load
+ * @param[in] contents_size Size of @a contents (in bytes). If @c 0 is given length of @a contents is used
+ * @param[in] mime_type Type of @a contents data. If @c 0 is given "text/html" is assumed
+ * @param[in] encoding Encoding for @a contents data, if @c 0 is given "UTF-8" is assumed
+ * @param[in] base_uri Base uri to use for relative resources. may be @c 0. If provided @b must be an absolute uri
+ * @return EINA_TRUE on success or EINA_FALSE otherwise
+ */
+EAPI Eina_Bool elm_webview_contents_set(Evas_Object *obj, const char *contents, size_t contents_size, const char *mime_type, const char *encoding, const char *base_uri);
+
+/**
+ * @fn Eina_Bool elm_webview_reload(Evas_Object *obj)
+ * @brief Request to reload current document
+ *
+ * @param[in] obj An WebView object
+ * @return EINA_TRUE on success or EINA_FALSE otherwise
+ */
+EAPI Eina_Bool elm_webview_reload(Evas_Object *obj);
+
+/**
+ * @fn Eina_Bool elm_webview_stop(Evas_Object *obj)
+ * @brief Request to to stop loading
+ *
+ * @param[in] obj An WebView object
+ * @return EINA_TRUE on success or EINA_FALSE otherwise
+ */
+EAPI Eina_Bool elm_webview_stop(Evas_Object *obj);
+
+/**
+ * @fn Eina_Bool elm_webview_zoom_set(Evas_Object *obj, float zoom)
+ * @brief Set the current zoom level
+ *
+ * @param[in] obj An WebView object
+ * @param[in] zoom A new level to set
+ * @return EINA_TRUE on success or EINA_FALSE otherwise
+ */
+EAPI Eina_Bool elm_webview_zoom_set(Evas_Object *obj, float zoom);
+
+/**
+ * @fn float elm_webview_zoom_get(Evas_Object *obj)
+ * @brief Get the current zoom level
+ *
+ * @param[in] obj An WebView object
+ * @return Current zoom level in use on success or @c -1.0 on failure
+ */
+EAPI float elm_webview_zoom_get(Evas_Object *obj);
+
+/**
+ * @fn Eina_Bool elm_webview_zoom_in_possible(Evas_Object *obj)
+ * @brief Query if it's possible to zoom in
+ *
+ * @param[in] obj An WebView object
+ * @return EINA_TRUE if it's possible to zoom in, EINA_FALSE otherwise
+ */
+EAPI Eina_Bool elm_webview_zoom_in_possible(Evas_Object *obj);
+
+/**
+ * @fn Eina_Bool elm_webview_zoom_out_possible(Evas_Object *obj)
+ * @brief Query if it's possible to zoom out
+ *
+ * @param[in] obj An WebView object
+ * @return EINA_TRUE if it's possible to zoom out, EINA_FALSE otherwise
+ */
+EAPI Eina_Bool elm_webview_zoom_out_possible(Evas_Object *obj);
+
+/**
+ * @fn Eina_Bool elm_webview_scroll_by(Evas_Object *obj, int dx, int dy)
+ * @brief Scroll @a delta_x and @a delta_y pixels from the current position of scroll
+ *
+ * @param[in] obj An WebView object
+ * @param[in] dx Horizontal offset to scroll
+ * @param[in] dy Vertical offset to scroll
+ * @return EINA_TRUE on success or EINA_FALSE otherwise
+ */
+EAPI Eina_Bool elm_webview_scroll_by(Evas_Object *obj, int dx, int dy);
+
+/**
+ * @fn Eina_Bool elm_webview_scroll_pos_set(Evas_Object *obj, int x, int y)
+ * @brief Set the scroll position
+ *
+ * @param[in] obj An WebView object
+ * @param[in] x Horizontal position to scroll
+ * @param[in] y Vertical position to scroll
+ * @return EINA_TRUE on success or EINA_FALSE otherwise
+ */
+EAPI Eina_Bool elm_webview_scroll_pos_set(Evas_Object *obj, int x, int y);
+
+/**
+ * @fn Eina_Bool elm_webview_scroll_pos_get(Evas_Object *obj, int* x, int* y)
+ * @brief Get the scroll position
+ *
+ * @param[in] obj An WebView object
+ * @param[out] x Horizontal position
+ * @param[out] y Vertical position
+ * @return EINA_TRUE on success or EINA_FALSE otherwise
+ */
+EAPI Eina_Bool elm_webview_scroll_pos_get(Evas_Object *obj, int *x, int *y);
+
+/**
+ * @fn const char *elm_webview_title_get(const Evas_Object *obj)
+ * @brief Get the current title
+ *
+ * @param[in] obj An WebView object
+ * @return Current title on success or @c NULL on failure
+ */
+EAPI const char *elm_webview_title_get(const Evas_Object *obj);
+
+/**
+ * @fn Eina_Bool elm_webview_text_search(const Evas_Object *obj, const char* string, Eina_Bool case_sensitive, Eina_Bool forward, Eina_Bool wrap)
+ * @brief Searches the given string in a document.
+ *
+ * @param[in] obj An WebView object
+ * @param[in] string Reference string to search
+ * @param[in] case_sensitive If search should be case sensitive or not
+ * @param[in] forward If search is from cursor and on or backwards
+ * @param[in] wrap If search should wrap at the end
+ * @return EINA_TRUE if the given string was found, EINA_FALSE if not or failure
+ */
+EAPI Eina_Bool elm_webview_text_search(const Evas_Object *obj, const char* string, Eina_Bool case_sensitive, Eina_Bool forward, Eina_Bool wrap);
+
+/**
+ * @fn unsigned int elm_webview_text_matches_mark(Evas_Object *obj, const char *string, Eina_Bool case_sensitive, Eina_Bool highlight, unsigned int limit)
+ * @brief Mark matches the given string in a document.
+ *
+ * @param[in] obj An WebView object
+ * @param[in] string Reference string to match
+ * @param[in] case_sensitive If match should be case sensitive or not
+ * @param[in] highlight If matches should be highlighted
+ * @param[in] limit Maximum amount of matches, or zero to unlimited
+ * @return Number of matched @a string
+ */
+EAPI unsigned int elm_webview_text_matches_mark(Evas_Object *obj, const char *string, Eina_Bool case_sensitive, Eina_Bool highlight, unsigned int limit);
+
+/**
+ * @fn Eina_Bool elm_webview_text_matches_unmark_all(Evas_Object *obj)
+ * @brief Unmark all marked matches in a document.
+ *
+ * @param[in] obj An WebView object
+ * @return EINA_TRUE on success or EINA_FALSE on failure
+ */
+EAPI Eina_Bool elm_webview_text_matches_unmark_all(Evas_Object *obj);
+
+/**
+ * @fn Eina_Bool elm_webview_text_matches_highlight_set(Evas_Object *obj, Eina_Bool highlight)
+ * @brief Set if should highlight matches marked with elm_webview_text_matches_mark().
+ *
+ * @param[in] obj An WebView object
+ * @param[in] highlight EINA_TRUE if matches are highlighted, EINA_FALSE if not
+ * @return EINA_TRUE on success or EINA_FALSE on failure
+ */
+EAPI Eina_Bool elm_webview_text_matches_highlight_set(Evas_Object *obj, Eina_Bool highlight);
+
+/**
+ * @fn Eina_Bool elm_webview_text_matches_highlight_get(Evas_Object *obj)
+ * @brief Get if should highlight matches marked with elm_webview_text_matches_mark().
+ *
+ * @param[in] obj An WebView object
+ * @return EINA_TRUE if matches are highlighted, EINA_FALSE otherwise
+ */
+EAPI Eina_Bool elm_webview_text_matches_highlight_get(Evas_Object *obj);
+
#ifdef __cplusplus
}
#endif
CC ?= gcc
-TARGETS = utc_INTERNETFW_elm_webview_add_func \
- utc_INTERNETFW_elm_webview_webkit_get_func \
- utc_INTERNETFW_elm_webview_events_feed_set_func \
- utc_INTERNETFW_elm_webview_events_feed_get_func \
- utc_INTERNETFW_elm_webview_auto_fitting_set_func \
+TARGETS = \
+ utc_INTERNETFW_elm_webview_add_func \
utc_INTERNETFW_elm_webview_auto_fitting_get_func \
- utc_INTERNETFW_elm_webview_uri_set_func \
- utc_INTERNETFW_elm_webview_scheme_callback_set_func \
- utc_INTERNETFW_elm_webview_layout_width_set_to_container_func \
- utc_INTERNETFW_elm_webview_input_field_zoom_set_func \
- utc_INTERNETFW_elm_webview_auto_suspend_set_func \
- utc_INTERNETFW_elm_webview_enable_default_context_menu_set_func \
- utc_INTERNETFW_elm_webview_enable_default_context_menu_get_func \
+ utc_INTERNETFW_elm_webview_auto_fitting_set_func \
+ utc_INTERNETFW_elm_webview_back_func \
+ utc_INTERNETFW_elm_webview_back_possible_func \
+ utc_INTERNETFW_elm_webview_cbhm_run_func \
+ utc_INTERNETFW_elm_webview_contents_set_func \
utc_INTERNETFW_elm_webview_context_menu_item_selected_func \
- utc_INTERNETFW_elm_webview_enable_default_touch_set_func \
+ utc_INTERNETFW_elm_webview_events_feed_get_func \
+ utc_INTERNETFW_elm_webview_events_feed_set_func \
+ utc_INTERNETFW_elm_webview_fixed_position_get_func \
+ utc_INTERNETFW_elm_webview_fixed_position_set_func \
+ utc_INTERNETFW_elm_webview_forward_func \
+ utc_INTERNETFW_elm_webview_forward_possible_func \
+ utc_INTERNETFW_elm_webview_horizontal_panning_hold_get_func \
+ utc_INTERNETFW_elm_webview_horizontal_panning_hold_set_func \
+ utc_INTERNETFW_elm_webview_input_field_zoom_get_func \
+ utc_INTERNETFW_elm_webview_input_field_zoom_set_func \
+ utc_INTERNETFW_elm_webview_navigate_func \
+ utc_INTERNETFW_elm_webview_navigate_possible_func \
+ utc_INTERNETFW_elm_webview_pause_func \
+ utc_INTERNETFW_elm_webview_reload_func \
+ utc_INTERNETFW_elm_webview_resume_func \
+ utc_INTERNETFW_elm_webview_scheme_callback_set_func \
+ utc_INTERNETFW_elm_webview_scroll_by_func \
+ utc_INTERNETFW_elm_webview_scroll_pos_get_func \
+ utc_INTERNETFW_elm_webview_scroll_pos_set_func \
+ utc_INTERNETFW_elm_webview_show_magnifier_get_func \
+ utc_INTERNETFW_elm_webview_show_magnifier_set_func \
+ utc_INTERNETFW_elm_webview_stop_func \
+ utc_INTERNETFW_elm_webview_text_matches_highlight_get_func \
+ utc_INTERNETFW_elm_webview_text_matches_highlight_set_func \
+ utc_INTERNETFW_elm_webview_text_matches_mark_func \
+ utc_INTERNETFW_elm_webview_text_matches_unmark_all_func \
+ utc_INTERNETFW_elm_webview_text_search_func \
+ utc_INTERNETFW_elm_webview_text_selection_clear_func \
+ utc_INTERNETFW_elm_webview_title_get_func \
+ utc_INTERNETFW_elm_webview_uri_get_func \
+ utc_INTERNETFW_elm_webview_uri_set_func \
+ utc_INTERNETFW_elm_webview_use_smart_zoom_get_func \
+ utc_INTERNETFW_elm_webview_use_smart_zoom_set_func \
+ utc_INTERNETFW_elm_webview_vertical_panning_hold_get_func \
utc_INTERNETFW_elm_webview_vertical_panning_hold_set_func \
- utc_INTERNETFW_elm_webview_text_selection_clear_func
-
+ utc_INTERNETFW_elm_webview_webkit_view_get_func \
+ utc_INTERNETFW_elm_webview_zoom_get_func \
+ utc_INTERNETFW_elm_webview_zoom_set_func
-PKGS = gobject-2.0 elementary evas elm-webview
+PKGS = gobject-2.0 glib-2.0 elementary evas ecore-evas eina ecore ewebkit elm-webview
LDFLAGS = `pkg-config --libs $(PKGS)`
LDFLAGS += $(TET_ROOT)/lib/tet3/tcm_s.o
/elm_ts/webview/utc_INTERNETFW_elm_webview_add_func
-/elm_ts/webview/utc_INTERNETFW_elm_webview_webkit_get_func
-/elm_ts/webview/utc_INTERNETFW_elm_webview_events_feed_set_func
-/elm_ts/webview/utc_INTERNETFW_elm_webview_events_feed_get_func
-/elm_ts/webview/utc_INTERNETFW_elm_webview_auto_fitting_set_func
/elm_ts/webview/utc_INTERNETFW_elm_webview_auto_fitting_get_func
-/elm_ts/webview/utc_INTERNETFW_elm_webview_uri_set_func
-/elm_ts/webview/utc_INTERNETFW_elm_webview_scheme_callback_set_func
-/elm_ts/webview/utc_INTERNETFW_elm_webview_layout_width_set_to_container_func
-/elm_ts/webview/utc_INTERNETFW_elm_webview_input_field_zoom_set_func
-/elm_ts/webview/utc_INTERNETFW_elm_webview_auto_suspend_set_func
-/elm_ts/webview/utc_INTERNETFW_elm_webview_enable_default_context_menu_set_func
-/elm_ts/webview/utc_INTERNETFW_elm_webview_enable_default_context_menu_get_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_auto_fitting_set_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_back_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_back_possible_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_cbhm_run_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_contents_set_func
/elm_ts/webview/utc_INTERNETFW_elm_webview_context_menu_item_selected_func
-/elm_ts/webview/utc_INTERNETFW_elm_webview_enable_default_touch_set_func
-/elm_ts/webview/utc_INTERNETFW_elm_webview_vertical_panning_hold_set_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_events_feed_get_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_events_feed_set_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_fixed_position_get_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_fixed_position_set_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_forward_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_forward_possible_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_horizontal_panning_hold_get_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_horizontal_panning_hold_set_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_input_field_zoom_get_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_input_field_zoom_set_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_navigate_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_navigate_possible_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_pause_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_reload_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_resume_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_scheme_callback_set_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_scroll_by_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_scroll_pos_get_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_scroll_pos_set_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_show_magnifier_get_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_show_magnifier_set_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_stop_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_text_matches_highlight_get_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_text_matches_highlight_set_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_text_matches_mark_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_text_matches_unmark_all_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_text_search_func
/elm_ts/webview/utc_INTERNETFW_elm_webview_text_selection_clear_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_title_get_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_uri_get_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_uri_set_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_use_smart_zoom_get_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_use_smart_zoom_set_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_vertical_panning_hold_get_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_vertical_panning_hold_set_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_webkit_view_get_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_zoom_get_func
+/elm_ts/webview/utc_INTERNETFW_elm_webview_zoom_set_func
}
/**
- * @brief Negative test case of ug_init elm_webview_auto_fitting_get()
+ * @brief Negative test case of elm_webview_auto_fitting_get()
*/
static void utc_INTERNETFW_elm_webview_auto_fitting_get_func_02(void)
{
}
/**
- * @brief Negative test case of ug_init elm_webview_auto_fitting_set()
+ * @brief Negative test case of elm_webview_auto_fitting_set()
*/
static void utc_INTERNETFW_elm_webview_auto_fitting_set_func_02(void)
{
}
/**
- * @brief Negative test case of ug_init elm_webview_auto_suspend_set()
+ * @brief Negative test case of elm_webview_auto_suspend_set()
*/
static void utc_INTERNETFW_elm_webview_auto_suspend_set_func_02(void)
{
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *webview;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_back_func_01(void);
+static void utc_INTERNETFW_elm_webview_back_func_02(void);
+
+static void loadStarted(void *data, Evas_Object *webview, void *arg);
+static void loadFinished(void *data, Evas_Object *webview, void *arg);
+static void loadError(void *data, Evas_Object *webview, void *arg);
+static Eina_Bool SecondLoadStart(void *data);
+static int g_count = 0;
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_back_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_back_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_thread_init(NULL);
+ ecore_evas_init();
+ edje_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_resize(main_win, 480, 800);
+ evas_object_show(main_win);
+ ewk_init();
+
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ Evas_Object *view = elm_webview_webkit_view_get(webview);
+ evas_object_show(webview);
+ evas_object_smart_callback_add(view, "load,started", loadStarted, NULL);
+ evas_object_smart_callback_add(view, "load,finished", loadFinished, NULL);
+ evas_object_smart_callback_add(view, "load,error", loadError, NULL);
+ elm_webview_uri_set(webview, "http://m.naver.com");
+ ecore_main_loop_begin();
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+static Eina_Bool SecondLoadStart(void *data)
+{
+ elm_webview_uri_set(webview, "http://www.google.co.kr");
+ return EINA_FALSE;
+}
+
+static void loadStarted(void *data, Evas_Object *webview, void *arg)
+{
+ g_count++;
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+ if (g_count == 1)
+ ecore_timer_add(0, SecondLoadStart, 0);
+ else {
+ ecore_main_loop_quit();
+ g_count = 0;
+ }
+}
+
+static void loadError(void *data, Evas_Object *webview, void *arg)
+{
+ if (g_count >= 1) {
+ ecore_main_loop_quit();
+ } else {
+ ecore_main_loop_quit();
+ g_count = 0;
+ }
+ tet_printf("[[ TET_MSG ]]:: Oops!! load error is occurred!!\n");
+}
+
+/**
+ * @brief Positive test case of elm_webview_back()
+ */
+static void utc_INTERNETFW_elm_webview_back_func_01(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ result = elm_webview_back(webview);
+ dts_check_eq("elm_webview_back", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_back()
+ */
+static void utc_INTERNETFW_elm_webview_back_func_02(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ result = elm_webview_back(NULL);
+
+ dts_check_ne("elm_webview_back", result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *webview;
+
+Eina_Bool negative_result = EINA_TRUE;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_back_possible_func_01(void);
+static void utc_INTERNETFW_elm_webview_back_possible_func_02(void);
+
+static void loadStarted(void *data, Evas_Object *webview, void *arg);
+static void loadFinished(void *data, Evas_Object *webview, void *arg);
+static void loadError(void *data, Evas_Object *webview, void *arg);
+static Eina_Bool SecondLoadStart(void *data);
+static int g_count = 0;
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_back_possible_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_back_possible_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_thread_init(NULL);
+ ecore_evas_init();
+ edje_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_resize(main_win, 480, 800);
+ evas_object_show(main_win);
+ ewk_init();
+
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ Evas_Object *view = elm_webview_webkit_view_get(webview);
+ evas_object_show(webview);
+ evas_object_smart_callback_add(view, "load,started", loadStarted, NULL);
+ evas_object_smart_callback_add(view, "load,finished", loadFinished, NULL);
+ evas_object_smart_callback_add(view, "load,error", loadError, NULL);
+ elm_webview_uri_set(webview, "http://m.naver.com");
+ ecore_main_loop_begin();
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+static Eina_Bool SecondLoadStart(void *data)
+{
+ elm_webview_uri_set(webview, "http://www.google.co.kr");
+ return EINA_FALSE;
+}
+
+static void loadStarted(void *data, Evas_Object *webview, void *arg)
+{
+ g_count++;
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+ if (g_count == 1) {
+ negative_result = elm_webview_back_possible(webview);
+ ecore_timer_add(0, SecondLoadStart, 0);
+ }
+ else {
+ ecore_main_loop_quit();
+ g_count = 0;
+ }
+}
+
+static void loadError(void *data, Evas_Object *webview, void *arg)
+{
+ if (g_count >= 1) {
+ ecore_main_loop_quit();
+ } else {
+ ecore_main_loop_quit();
+ g_count = 0;
+ }
+ tet_printf("[[ TET_MSG ]]:: Oops!! load error is occurred!!\n");
+}
+
+/**
+ * @brief Positive test case of elm_webview_back_possible()
+ */
+static void utc_INTERNETFW_elm_webview_back_possible_func_01(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ result = elm_webview_back_possible(webview);
+ dts_check_eq("elm_webview_back_possible", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_back_possible()
+ */
+static void utc_INTERNETFW_elm_webview_back_possible_func_02(void)
+{
+ Eina_Bool result = negative_result;
+ dts_check_ne("elm_webview_back_possible", result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_cbhm_run_func_01(void);
+static void utc_INTERNETFW_elm_webview_cbhm_run_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_cbhm_run_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_cbhm_run_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_type_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_show(main_win);
+ ewk_init();
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_webview_cbhm_run()
+ */
+static void utc_INTERNETFW_elm_webview_cbhm_run_func_01(void)
+{
+ Evas_Object *webview = NULL;
+ Eina_Bool result = EINA_TRUE;
+ webview = elm_webview_add(main_win, EINA_TRUE);
+
+ elm_webview_cbhm_run(webview);
+ evas_object_del(webview);
+ webview = NULL;
+
+ dts_check_eq("elm_webview_cbhm_run", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_cbhm_run()
+ */
+static void utc_INTERNETFW_elm_webview_cbhm_run_func_02(void)
+{
+ Eina_Bool result = EINA_FALSE;
+
+ elm_webview_cbhm_run(NULL);
+
+ dts_check_ne("elm_webview_cbhm_run", result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *webview;
+
+Eina_Bool g_result = EINA_FALSE;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_contents_set_func_01(void);
+static void utc_INTERNETFW_elm_webview_contents_set_func_02(void);
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg);
+static void loadError(void *data, Evas_Object *webview, void *arg);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_contents_set_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_contents_set_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_thread_init(NULL);
+ ecore_evas_init();
+ edje_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_resize(main_win, 480, 800);
+ evas_object_show(main_win);
+ ewk_init();
+
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ Evas_Object *view = elm_webview_webkit_view_get(webview);
+ evas_object_show(webview);
+ evas_object_smart_callback_add(view, "load,finished", loadFinished, NULL);
+ evas_object_smart_callback_add(view, "load,error", loadError, NULL);
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ g_result = EINA_TRUE;
+}
+
+static void loadError(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ tet_printf("[[ TET_MSG ]]:: Oops!! load error is occurred!!\n");
+}
+
+/**
+ * @brief Positive test case of elm_webview_contents_set()
+ */
+static void utc_INTERNETFW_elm_webview_contents_set_func_01(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ result = elm_webview_contents_set(webview, "<html><body><div style=\"color:#ff0000\"> this is a test message.</div></body</html>", 0, "text/html", "UTF-8", "http://www.google.com");
+ if (result)
+ ecore_main_loop_begin();
+ else
+ g_result = result;
+ dts_check_eq("elm_webview_contents_set", g_result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_contents_set()
+ */
+static void utc_INTERNETFW_elm_webview_contents_set_func_02(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ result = elm_webview_contents_set(NULL, NULL, 0, NULL, NULL, NULL);
+ dts_check_ne("elm_webview_contents_set", result, EINA_TRUE, "failed in negative test case");
+}
tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
}
-static void scheme_cb(Evas_Object *obj, const char *uri);
/**
- * @brief Positive test case of elm_webview_context_menu_item_selected()
+ * @brief Positve test case of elm_webview_context_menu_item_selected()
*/
static void utc_INTERNETFW_elm_webview_context_menu_item_selected_func_01(void)
{
- Evas_Object *webview = NULL;
- webview = elm_webview_add(main_win, EINA_TRUE);
-
// can not test this API
- elm_webview_context_menu_item_selected(webview, NULL);
- evas_object_del(webview);
- webview = NULL;
+ //elm_webview_context_menu_item_selected(NULL, NULL);
dts_check_eq("elm_webview_context_menu_item_selected", EINA_TRUE, EINA_TRUE, "failed in positive test case");
}
/**
- * @brief Negative test case of ug_init elm_webview_context_menu_item_selected()
+ * @brief Negative test case of elm_webview_context_menu_item_selected()
*/
static void utc_INTERNETFW_elm_webview_context_menu_item_selected_func_02(void)
{
- Eina_Bool h_bounce = EINA_FALSE;
-
// can not test this API
elm_webview_context_menu_item_selected(NULL, NULL);
}
/**
- * @brief Negative test case of ug_init elm_webview_enable_default_context_menu_get()
+ * @brief Negative test case of elm_webview_enable_default_context_menu_get()
*/
static void utc_INTERNETFW_elm_webview_enable_default_context_menu_get_func_02(void)
{
}
/**
- * @brief Negative test case of ug_init elm_webview_enable_default_context_menu_set()
+ * @brief Negative test case of elm_webview_enable_default_context_menu_set()
*/
static void utc_INTERNETFW_elm_webview_enable_default_context_menu_set_func_02(void)
{
}
/**
- * @brief Negative test case of ug_init elm_webview_enable_default_touch_set()
+ * @brief Negative test case of elm_webview_enable_default_touch_set()
*/
static void utc_INTERNETFW_elm_webview_enable_default_touch_set_func_02(void)
{
}
/**
- * @brief Negative test case of ug_init elm_webview_events_feed_get()
+ * @brief Negative test case of elm_webview_events_feed_get()
*/
static void utc_INTERNETFW_elm_webview_events_feed_get_func_02(void)
{
}
/**
- * @brief Negative test case of ug_init elm_webview_events_feed_set()
+ * @brief Negative test case of elm_webview_events_feed_set()
*/
static void utc_INTERNETFW_elm_webview_events_feed_set_func_02(void)
{
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_fixed_position_get_func_01(void);
+static void utc_INTERNETFW_elm_webview_fixed_position_get_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_fixed_position_get_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_fixed_position_get_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_type_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_show(main_win);
+ ewk_init();
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_webview_fixed_position_get()
+ */
+static void utc_INTERNETFW_elm_webview_fixed_position_get_func_01(void)
+{
+ Evas_Object *webview = NULL;
+ Eina_Bool result = EINA_TRUE;
+ webview = elm_webview_add(main_win, EINA_TRUE);
+
+ elm_webview_fixed_position_set(webview, EINA_TRUE);
+ result = elm_webview_fixed_position_get(webview);
+ evas_object_del(webview);
+ webview = NULL;
+
+ dts_check_eq("elm_webview_fixed_position_get", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_fixed_position_get()
+ */
+static void utc_INTERNETFW_elm_webview_fixed_position_get_func_02(void)
+{
+ Eina_Bool result = EINA_FALSE;
+
+ elm_webview_fixed_position_set(NULL, EINA_TRUE);
+ result = elm_webview_fixed_position_get(NULL);
+
+ dts_check_ne("elm_webview_fixed_position_get", result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_fixed_position_set_func_01(void);
+static void utc_INTERNETFW_elm_webview_fixed_position_set_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_fixed_position_set_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_fixed_position_set_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_type_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_show(main_win);
+ ewk_init();
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_webview_fixed_position_set()
+ */
+static void utc_INTERNETFW_elm_webview_fixed_position_set_func_01(void)
+{
+ Evas_Object *webview = NULL;
+ Eina_Bool result = EINA_TRUE;
+ webview = elm_webview_add(main_win, EINA_TRUE);
+
+ elm_webview_fixed_position_set(webview, EINA_TRUE);
+ result = elm_webview_fixed_position_get(webview);
+ evas_object_del(webview);
+ webview = NULL;
+
+ dts_check_eq("elm_webview_fixed_position_set", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_fixed_position_set()
+ */
+static void utc_INTERNETFW_elm_webview_fixed_position_set_func_02(void)
+{
+ Eina_Bool result = EINA_FALSE;
+
+ elm_webview_fixed_position_set(NULL, EINA_TRUE);
+ result = elm_webview_fixed_position_get(NULL);
+
+ dts_check_ne("elm_webview_fixed_position_set", result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *webview;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_forward_func_01(void);
+static void utc_INTERNETFW_elm_webview_forward_func_02(void);
+
+static void loadStarted(void *data, Evas_Object *webview, void *arg);
+static void loadFinished(void *data, Evas_Object *webview, void *arg);
+static void loadError(void *data, Evas_Object *webview, void *arg);
+static Eina_Bool SecondLoadStart(void *data);
+static int g_count = 0;
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_forward_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_forward_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_thread_init(NULL);
+ ecore_evas_init();
+ edje_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_resize(main_win, 480, 800);
+ evas_object_show(main_win);
+ ewk_init();
+
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ Evas_Object *view = elm_webview_webkit_view_get(webview);
+ evas_object_show(webview);
+ evas_object_smart_callback_add(view, "load,started", loadStarted, NULL);
+ evas_object_smart_callback_add(view, "load,finished", loadFinished, NULL);
+ evas_object_smart_callback_add(view, "load,error", loadError, NULL);
+ elm_webview_uri_set(webview, "http://m.naver.com");
+ ecore_main_loop_begin();
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+static Eina_Bool SecondLoadStart(void *data)
+{
+ elm_webview_uri_set(webview, "http://www.google.co.kr");
+ return EINA_FALSE;
+}
+
+static void loadStarted(void *data, Evas_Object *webview, void *arg)
+{
+ g_count++;
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+ if (g_count == 1)
+ ecore_timer_add(0, SecondLoadStart, 0);
+ else {
+ ecore_main_loop_quit();
+ g_count = 0;
+ }
+}
+
+static void loadError(void *data, Evas_Object *webview, void *arg)
+{
+ if (g_count >= 1) {
+ ecore_main_loop_quit();
+ } else {
+ ecore_main_loop_quit();
+ g_count = 0;
+ }
+ tet_printf("[[ TET_MSG ]]:: Oops!! load error is occurred!!\n");
+}
+
+/**
+ * @brief Positive test case of elm_webview_forward()
+ */
+static void utc_INTERNETFW_elm_webview_forward_func_01(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ result = elm_webview_back(webview);
+ result = elm_webview_forward(webview);
+ dts_check_eq("elm_webview_forward", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_forward()
+ */
+static void utc_INTERNETFW_elm_webview_forward_func_02(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ result = elm_webview_forward(webview);
+ dts_check_ne("elm_webview_forward", result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *webview;
+
+Eina_Bool negative_result = EINA_TRUE;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_forward_possible_func_01(void);
+static void utc_INTERNETFW_elm_webview_forward_possible_func_02(void);
+
+static void loadStarted(void *data, Evas_Object *webview, void *arg);
+static void loadFinished(void *data, Evas_Object *webview, void *arg);
+static void loadError(void *data, Evas_Object *webview, void *arg);
+static Eina_Bool SecondLoadStart(void *data);
+static int g_count = 0;
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_forward_possible_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_forward_possible_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_thread_init(NULL);
+ ecore_evas_init();
+ edje_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_resize(main_win, 480, 800);
+ evas_object_show(main_win);
+ ewk_init();
+
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ Evas_Object *view = elm_webview_webkit_view_get(webview);
+ evas_object_show(webview);
+ evas_object_smart_callback_add(view, "load,started", loadStarted, NULL);
+ evas_object_smart_callback_add(view, "load,finished", loadFinished, NULL);
+ evas_object_smart_callback_add(view, "load,error", loadError, NULL);
+ elm_webview_uri_set(webview, "http://m.naver.com");
+ ecore_main_loop_begin();
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+static Eina_Bool SecondLoadStart(void *data)
+{
+ elm_webview_uri_set(webview, "http://www.google.co.kr");
+ return EINA_FALSE;
+}
+
+static void loadStarted(void *data, Evas_Object *webview, void *arg)
+{
+ g_count++;
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+ if (g_count == 1) {
+ negative_result = elm_webview_forward_possible(webview);
+ ecore_timer_add(0, SecondLoadStart, 0);
+ }
+ else {
+ ecore_main_loop_quit();
+ g_count = 0;
+ }
+}
+
+static void loadError(void *data, Evas_Object *webview, void *arg)
+{
+ if (g_count >= 1) {
+ ecore_main_loop_quit();
+ } else {
+ ecore_main_loop_quit();
+ g_count = 0;
+ }
+ tet_printf("[[ TET_MSG ]]:: Oops!! load error is occurred!!\n");
+}
+
+/**
+ * @brief Positive test case of elm_webview_forward_possible()
+ */
+static void utc_INTERNETFW_elm_webview_forward_possible_func_01(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ result = elm_webview_back(webview);
+ result = elm_webview_forward_possible(webview);
+ dts_check_eq("elm_webview_forward_possible", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_forward_possible()
+ */
+static void utc_INTERNETFW_elm_webview_forward_possible_func_02(void)
+{
+ Eina_Bool result = negative_result;
+ dts_check_ne("elm_webview_forward_possible", result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_horizontal_panning_hold_get_func_01(void);
+static void utc_INTERNETFW_elm_webview_horizontal_panning_hold_get_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_horizontal_panning_hold_get_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_horizontal_panning_hold_get_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_type_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_show(main_win);
+ ewk_init();
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_webview_horizontal_panning_hold_get()
+ */
+static void utc_INTERNETFW_elm_webview_horizontal_panning_hold_get_func_01(void)
+{
+ Evas_Object *webview = NULL;
+ Eina_Bool horizontal_panning_hold = EINA_TRUE;
+ webview = elm_webview_add(main_win, EINA_TRUE);
+
+ elm_webview_horizontal_panning_hold_set(webview, EINA_TRUE);
+ horizontal_panning_hold = elm_webview_horizontal_panning_hold_get(webview);
+ evas_object_del(webview);
+ webview = NULL;
+
+ dts_check_eq("elm_webview_horizontal_panning_hold_get", horizontal_panning_hold, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_horizontal_panning_hold_get()
+ */
+static void utc_INTERNETFW_elm_webview_horizontal_panning_hold_get_func_02(void)
+{
+ Eina_Bool horizontal_panning_hold = EINA_FALSE;
+
+ elm_webview_horizontal_panning_hold_set(NULL, EINA_TRUE);
+ horizontal_panning_hold = elm_webview_horizontal_panning_hold_get(NULL);
+
+ dts_check_ne("elm_webview_horizontal_panning_hold_get", horizontal_panning_hold, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_horizontal_panning_hold_set_func_01(void);
+static void utc_INTERNETFW_elm_webview_horizontal_panning_hold_set_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_horizontal_panning_hold_set_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_horizontal_panning_hold_set_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_type_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_show(main_win);
+ ewk_init();
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_webview_horizontal_panning_hold_set()
+ */
+static void utc_INTERNETFW_elm_webview_horizontal_panning_hold_set_func_01(void)
+{
+ Evas_Object *webview = NULL;
+ Eina_Bool horizontal_panning_hold = EINA_TRUE;
+ webview = elm_webview_add(main_win, EINA_TRUE);
+
+ elm_webview_horizontal_panning_hold_set(webview, EINA_TRUE);
+ horizontal_panning_hold = elm_webview_horizontal_panning_hold_get(webview);
+ evas_object_del(webview);
+ webview = NULL;
+
+ dts_check_eq("elm_webview_horizontal_panning_hold_set", horizontal_panning_hold, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_horizontal_panning_hold_set()
+ */
+static void utc_INTERNETFW_elm_webview_horizontal_panning_hold_set_func_02(void)
+{
+ Eina_Bool horizontal_panning_hold = EINA_FALSE;
+
+ elm_webview_horizontal_panning_hold_set(NULL, EINA_TRUE);
+ horizontal_panning_hold = elm_webview_horizontal_panning_hold_get(NULL);
+
+ dts_check_ne("elm_webview_horizontal_panning_hold_set", horizontal_panning_hold, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_input_field_zoom_get_func_01(void);
+static void utc_INTERNETFW_elm_webview_input_field_zoom_get_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_input_field_zoom_get_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_input_field_zoom_get_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_type_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_show(main_win);
+ ewk_init();
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_webview_input_field_zoom_get()
+ */
+static void utc_INTERNETFW_elm_webview_input_field_zoom_get_func_01(void)
+{
+ Evas_Object *webview = NULL;
+ Eina_Bool input_field_zoom = EINA_TRUE;
+ webview = elm_webview_add(main_win, EINA_TRUE);
+
+ elm_webview_input_field_zoom_set(webview, EINA_TRUE);
+ input_field_zoom = elm_webview_input_field_zoom_get(webview);
+ evas_object_del(webview);
+ webview = NULL;
+
+ dts_check_eq("elm_webview_input_field_zoom_get", input_field_zoom, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_input_field_zoom_get()
+ */
+static void utc_INTERNETFW_elm_webview_input_field_zoom_get_func_02(void)
+{
+ Eina_Bool input_field_zoom = EINA_FALSE;
+
+ elm_webview_input_field_zoom_set(NULL, EINA_TRUE);
+ input_field_zoom = elm_webview_input_field_zoom_get(NULL);
+
+ dts_check_ne("elm_webview_input_field_zoom_get", input_field_zoom, EINA_TRUE, "failed in negative test case");
+}
}
/**
- * @brief Negative test case of ug_init elm_webview_input_field_zoom_set()
+ * @brief Negative test case of elm_webview_input_field_zoom_set()
*/
static void utc_INTERNETFW_elm_webview_input_field_zoom_set_func_02(void)
{
}
/**
- * @brief Negative test case of ug_init elm_webview_layout_width_set_to_container()
+ * @brief Negative test case of elm_webview_layout_width_set_to_container()
*/
static void utc_INTERNETFW_elm_webview_layout_width_set_to_container_func_02(void)
{
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *webview;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_navigate_func_01(void);
+static void utc_INTERNETFW_elm_webview_navigate_func_02(void);
+
+static void loadStarted(void *data, Evas_Object *webview, void *arg);
+static void loadFinished(void *data, Evas_Object *webview, void *arg);
+static void loadError(void *data, Evas_Object *webview, void *arg);
+static Eina_Bool SecondLoadStart(void *data);
+static int g_count = 0;
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_navigate_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_navigate_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_thread_init(NULL);
+ ecore_evas_init();
+ edje_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_resize(main_win, 480, 800);
+ evas_object_show(main_win);
+ ewk_init();
+
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ Evas_Object *view = elm_webview_webkit_view_get(webview);
+ evas_object_show(webview);
+ evas_object_smart_callback_add(view, "load,started", loadStarted, NULL);
+ evas_object_smart_callback_add(view, "load,finished", loadFinished, NULL);
+ evas_object_smart_callback_add(view, "load,error", loadError, NULL);
+ elm_webview_uri_set(webview, "http://m.naver.com");
+ ecore_main_loop_begin();
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+static Eina_Bool SecondLoadStart(void *data)
+{
+ elm_webview_uri_set(webview, "http://www.google.co.kr");
+ return EINA_FALSE;
+}
+
+static void loadStarted(void *data, Evas_Object *webview, void *arg)
+{
+ g_count++;
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+ if (g_count == 1)
+ ecore_timer_add(0, SecondLoadStart, 0);
+ else {
+ ecore_main_loop_quit();
+ g_count = 0;
+ }
+}
+
+static void loadError(void *data, Evas_Object *webview, void *arg)
+{
+ if (g_count >= 1) {
+ ecore_main_loop_quit();
+ } else {
+ ecore_main_loop_quit();
+ g_count = 0;
+ }
+ tet_printf("[[ TET_MSG ]]:: Oops!! load error is occurred!!\n");
+}
+
+/**
+ * @brief Positive test case of elm_webview_navigate()
+ */
+static void utc_INTERNETFW_elm_webview_navigate_func_01(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ result = elm_webview_navigate(webview, -1);
+ dts_check_eq("elm_webview_navigate", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_navigate()
+ */
+static void utc_INTERNETFW_elm_webview_navigate_func_02(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ result = elm_webview_navigate(webview, 4);
+ dts_check_ne("elm_webview_navigate", result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *webview;
+
+Eina_Bool negative_result = EINA_TRUE;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_navigate_possible_func_01(void);
+static void utc_INTERNETFW_elm_webview_navigate_possible_func_02(void);
+
+static void loadStarted(void *data, Evas_Object *webview, void *arg);
+static void loadFinished(void *data, Evas_Object *webview, void *arg);
+static void loadError(void *data, Evas_Object *webview, void *arg);
+static Eina_Bool SecondLoadStart(void *data);
+static int g_count = 0;
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_navigate_possible_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_navigate_possible_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_thread_init(NULL);
+ ecore_evas_init();
+ edje_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_resize(main_win, 480, 800);
+ evas_object_show(main_win);
+ ewk_init();
+
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ Evas_Object *view = elm_webview_webkit_view_get(webview);
+ evas_object_show(webview);
+ evas_object_smart_callback_add(view, "load,started", loadStarted, NULL);
+ evas_object_smart_callback_add(view, "load,finished", loadFinished, NULL);
+ evas_object_smart_callback_add(view, "load,error", loadError, NULL);
+ elm_webview_uri_set(webview, "http://m.naver.com");
+ ecore_main_loop_begin();
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+static Eina_Bool SecondLoadStart(void *data)
+{
+ elm_webview_uri_set(webview, "http://www.google.co.kr");
+ return EINA_FALSE;
+}
+
+static void loadStarted(void *data, Evas_Object *webview, void *arg)
+{
+ g_count++;
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+ if (g_count == 1) {
+ negative_result = elm_webview_navigate_possible(webview, -3);
+ ecore_timer_add(0, SecondLoadStart, 0);
+ }
+ else {
+ ecore_main_loop_quit();
+ g_count = 0;
+ }
+}
+
+static void loadError(void *data, Evas_Object *webview, void *arg)
+{
+ if (g_count >= 1) {
+ ecore_main_loop_quit();
+ } else {
+ ecore_main_loop_quit();
+ g_count = 0;
+ }
+ tet_printf("[[ TET_MSG ]]:: Oops!! load error is occurred!!\n");
+}
+
+/**
+ * @brief Positive test case of elm_webview_navigate_possible()
+ */
+static void utc_INTERNETFW_elm_webview_navigate_possible_func_01(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ result = elm_webview_navigate_possible(webview, -1);
+ dts_check_eq("elm_webview_navigate_possible", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_navigate_possible()
+ */
+static void utc_INTERNETFW_elm_webview_navigate_possible_func_02(void)
+{
+ Eina_Bool result = negative_result;
+ dts_check_ne("elm_webview_navigate_possible", result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <Elementary_webview.h>
+
+#include <Ecore.h>
+#include <Ecore_Evas.h>
+#include <Eina.h>
+#include <glib-object.h>
+#include <glib.h>
+
+#include <tet_api.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *webview;
+
+Eina_Bool g_result = EINA_FALSE;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_pause_func_01(void);
+static void utc_INTERNETFW_elm_webview_pause_func_02(void);
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg);
+static void loadError(void *data, Evas_Object *webview, void *arg);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_pause_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_pause_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_thread_init(NULL);
+ ecore_evas_init();
+ edje_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_resize(main_win, 480, 800);
+ evas_object_show(main_win);
+ ewk_init();
+
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ Evas_Object *view = elm_webview_webkit_view_get(webview);
+ evas_object_show(webview);
+ evas_object_smart_callback_add(view, "load,finished", loadFinished, NULL);
+ evas_object_smart_callback_add(view, "load,error", loadError, NULL);
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ g_result = EINA_TRUE;
+}
+
+static void loadError(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ tet_printf("[[ TET_MSG ]]:: Oops!! load error is occurred!!\n");
+}
+
+/**
+ * @brief Positive test case of elm_webview_pause()
+ */
+static void utc_INTERNETFW_elm_webview_pause_func_01(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ elm_webview_uri_set(webview, "http://webkit.org");
+ ecore_main_loop_begin();
+ elm_webview_pause(webview);
+ result = EINA_TRUE;
+ dts_check_eq("elm_webview_pause", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_pause()
+ */
+static void utc_INTERNETFW_elm_webview_pause_func_02(void)
+{
+ g_result = EINA_FALSE;
+ elm_webview_pause(NULL);
+ dts_check_ne("elm_webview_pause", g_result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <Elementary_webview.h>
+
+#include <Ecore.h>
+#include <Ecore_Evas.h>
+#include <Eina.h>
+#include <glib-object.h>
+#include <glib.h>
+
+#include <tet_api.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *webview;
+
+Eina_Bool g_result = EINA_FALSE;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_reload_func_01(void);
+static void utc_INTERNETFW_elm_webview_reload_func_02(void);
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg);
+static void loadError(void *data, Evas_Object *webview, void *arg);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_reload_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_reload_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_thread_init(NULL);
+ ecore_evas_init();
+ edje_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_resize(main_win, 480, 800);
+ evas_object_show(main_win);
+ ewk_init();
+
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ Evas_Object *view = elm_webview_webkit_view_get(webview);
+ evas_object_show(webview);
+ evas_object_smart_callback_add(view, "load,finished", loadFinished, NULL);
+ evas_object_smart_callback_add(view, "load,error", loadError, NULL);
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ g_result = EINA_TRUE;
+}
+
+static void loadError(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ tet_printf("[[ TET_MSG ]]:: Oops!! load error is occurred!!\n");
+}
+
+/**
+ * @brief Positive test case of elm_webview_reload()
+ */
+static void utc_INTERNETFW_elm_webview_reload_func_01(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ elm_webview_uri_set(webview, "http://webkit.org");
+ ecore_main_loop_begin();
+ if (g_result == EINA_TRUE && elm_webview_reload(webview))
+ result = EINA_TRUE;
+ else
+ result = EINA_FALSE;
+ dts_check_eq("elm_webview_reload", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_reload()
+ */
+static void utc_INTERNETFW_elm_webview_reload_func_02(void)
+{
+ g_result = EINA_FALSE;
+ g_result = elm_webview_reload(NULL);
+ dts_check_ne("elm_webview_reload", g_result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <Elementary_webview.h>
+
+#include <Ecore.h>
+#include <Ecore_Evas.h>
+#include <Eina.h>
+#include <glib-object.h>
+#include <glib.h>
+
+#include <tet_api.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *webview;
+
+Eina_Bool g_result = EINA_FALSE;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_resume_func_01(void);
+static void utc_INTERNETFW_elm_webview_resume_func_02(void);
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg);
+static void loadError(void *data, Evas_Object *webview, void *arg);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_resume_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_resume_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_thread_init(NULL);
+ ecore_evas_init();
+ edje_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_resize(main_win, 480, 800);
+ evas_object_show(main_win);
+ ewk_init();
+
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ Evas_Object *view = elm_webview_webkit_view_get(webview);
+ evas_object_show(webview);
+ evas_object_smart_callback_add(view, "load,finished", loadFinished, NULL);
+ evas_object_smart_callback_add(view, "load,error", loadError, NULL);
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ g_result = EINA_TRUE;
+}
+
+static void loadError(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ tet_printf("[[ TET_MSG ]]:: Oops!! load error is occurred!!\n");
+}
+
+/**
+ * @brief Positive test case of elm_webview_resume()
+ */
+static void utc_INTERNETFW_elm_webview_resume_func_01(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ elm_webview_uri_set(webview, "http://webkit.org");
+ ecore_main_loop_begin();
+ elm_webview_resume(webview);
+ result = EINA_TRUE;
+ dts_check_eq("elm_webview_resume", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_resume()
+ */
+static void utc_INTERNETFW_elm_webview_resume_func_02(void)
+{
+ g_result = EINA_FALSE;
+ elm_webview_resume(NULL);
+ dts_check_ne("elm_webview_resume", g_result, EINA_TRUE, "failed in negative test case");
+}
}
/**
- * @brief Negative test case of ug_init elm_webview_scheme_callback_set()
+ * @brief Negative test case of elm_webview_scheme_callback_set()
*/
static void utc_INTERNETFW_elm_webview_scheme_callback_set_func_02(void)
{
- Eina_Bool h_bounce = EINA_FALSE;
-
elm_webview_scheme_callback_set(NULL, "http://", scheme_cb);
// we can not check the scheme callback, because we do not have to scheme callback get API
//elm_webview_scheme_callback_get(NULL, "http://);
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *webview;
+
+Eina_Bool g_result = EINA_FALSE;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_scroll_by_func_01(void);
+static void utc_INTERNETFW_elm_webview_scroll_by_func_02(void);
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg);
+static void loadError(void *data, Evas_Object *webview, void *arg);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_scroll_by_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_scroll_by_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_thread_init(NULL);
+ ecore_evas_init();
+ edje_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_resize(main_win, 480, 800);
+ evas_object_show(main_win);
+ ewk_init();
+
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ Evas_Object *view = elm_webview_webkit_view_get(webview);
+ evas_object_show(webview);
+ evas_object_smart_callback_add(view, "load,finished", loadFinished, NULL);
+ evas_object_smart_callback_add(view, "load,error", loadError, NULL);
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ g_result = EINA_TRUE;
+}
+
+static void loadError(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ tet_printf("[[ TET_MSG ]]:: Oops!! load error is occurred!!\n");
+}
+
+/**
+ * @brief Positive test case of elm_webview_scroll_by()
+ */
+static void utc_INTERNETFW_elm_webview_scroll_by_func_01(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ elm_webview_uri_set(webview, "http://webkit.org");
+ ecore_main_loop_begin();
+ if (g_result == EINA_TRUE && elm_webview_scroll_by(webview, 10, 10))
+ result = EINA_TRUE;
+ else
+ result = EINA_FALSE;
+ dts_check_eq("elm_webview_scroll_by", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_scroll_by()
+ */
+static void utc_INTERNETFW_elm_webview_scroll_by_func_02(void)
+{
+ g_result = elm_webview_scroll_by(NULL, 10, 10);
+ dts_check_ne("elm_webview_scroll_by", g_result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *webview;
+
+Eina_Bool g_result = EINA_FALSE;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_scroll_pos_get_func_01(void);
+static void utc_INTERNETFW_elm_webview_scroll_pos_get_func_02(void);
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg);
+static void loadError(void *data, Evas_Object *webview, void *arg);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_scroll_pos_get_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_scroll_pos_get_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_thread_init(NULL);
+ ecore_evas_init();
+ edje_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_resize(main_win, 480, 800);
+ evas_object_show(main_win);
+ ewk_init();
+
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ Evas_Object *view = elm_webview_webkit_view_get(webview);
+ evas_object_show(webview);
+ evas_object_smart_callback_add(view, "load,finished", loadFinished, NULL);
+ evas_object_smart_callback_add(view, "load,error", loadError, NULL);
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ g_result = EINA_TRUE;
+}
+
+static void loadError(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ tet_printf("[[ TET_MSG ]]:: Oops!! load error is occurred!!\n");
+}
+
+/**
+ * @brief Positive test case of elm_webview_scroll_pos_get()
+ */
+static void utc_INTERNETFW_elm_webview_scroll_pos_get_func_01(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ int x, y;
+ elm_webview_uri_set(webview, "http://webkit.org");
+ ecore_main_loop_begin();
+ if (g_result == EINA_TRUE && elm_webview_scroll_pos_get(webview, &x, &y))
+ result = EINA_TRUE;
+ else
+ result = EINA_FALSE;
+ dts_check_eq("elm_webview_scroll_pos_get", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_scroll_pos_get()
+ */
+static void utc_INTERNETFW_elm_webview_scroll_pos_get_func_02(void)
+{
+ int x, y;
+ g_result = elm_webview_scroll_pos_get(NULL, &x, &y);
+ dts_check_ne("elm_webview_scroll_pos_get", g_result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *webview;
+
+Eina_Bool g_result = EINA_FALSE;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_scroll_pos_set_func_01(void);
+static void utc_INTERNETFW_elm_webview_scroll_pos_set_func_02(void);
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg);
+static void loadError(void *data, Evas_Object *webview, void *arg);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_scroll_pos_set_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_scroll_pos_set_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_thread_init(NULL);
+ ecore_evas_init();
+ edje_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_resize(main_win, 480, 800);
+ evas_object_show(main_win);
+ ewk_init();
+
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ Evas_Object *view = elm_webview_webkit_view_get(webview);
+ evas_object_show(webview);
+ evas_object_smart_callback_add(view, "load,finished", loadFinished, NULL);
+ evas_object_smart_callback_add(view, "load,error", loadError, NULL);
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ g_result = EINA_TRUE;
+}
+
+static void loadError(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ tet_printf("[[ TET_MSG ]]:: Oops!! load error is occurred!!\n");
+}
+
+/**
+ * @brief Positive test case of elm_webview_scroll_pos_set()
+ */
+static void utc_INTERNETFW_elm_webview_scroll_pos_set_func_01(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ elm_webview_uri_set(webview, "http://webkit.org");
+ ecore_main_loop_begin();
+ if (g_result == EINA_TRUE && elm_webview_scroll_pos_set(webview, 0, 0))
+ result = EINA_TRUE;
+ else
+ result = EINA_FALSE;
+ dts_check_eq("elm_webview_scroll_pos_set", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_scroll_pos_set()
+ */
+static void utc_INTERNETFW_elm_webview_scroll_pos_set_func_02(void)
+{
+ g_result = elm_webview_scroll_pos_set(NULL, 0, 0);
+ dts_check_ne("elm_webview_scroll_pos_set", g_result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_show_magnifier_get_func_01(void);
+static void utc_INTERNETFW_elm_webview_show_magnifier_get_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_show_magnifier_get_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_show_magnifier_get_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_type_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_show(main_win);
+ ewk_init();
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_webview_show_magnifier_get()
+ */
+static void utc_INTERNETFW_elm_webview_show_magnifier_get_func_01(void)
+{
+ Evas_Object *webview = NULL;
+ Eina_Bool result = EINA_TRUE;
+ webview = elm_webview_add(main_win, EINA_TRUE);
+
+ elm_webview_show_magnifier_set(webview, EINA_TRUE);
+ result = elm_webview_show_magnifier_get(webview);
+ evas_object_del(webview);
+ webview = NULL;
+
+ dts_check_eq("elm_webview_show_magnifier_get", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_show_magnifier_get()
+ */
+static void utc_INTERNETFW_elm_webview_show_magnifier_get_func_02(void)
+{
+ Eina_Bool result = EINA_FALSE;
+
+ elm_webview_show_magnifier_set(NULL, EINA_TRUE);
+ result = elm_webview_show_magnifier_get(NULL);
+
+ dts_check_ne("elm_webview_show_magnifier_get", result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_show_magnifier_set_func_01(void);
+static void utc_INTERNETFW_elm_webview_show_magnifier_set_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_show_magnifier_set_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_show_magnifier_set_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_type_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_show(main_win);
+ ewk_init();
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_webview_show_magnifier_set()
+ */
+static void utc_INTERNETFW_elm_webview_show_magnifier_set_func_01(void)
+{
+ Evas_Object *webview = NULL;
+ Eina_Bool result = EINA_TRUE;
+ webview = elm_webview_add(main_win, EINA_TRUE);
+
+ elm_webview_show_magnifier_set(webview, EINA_TRUE);
+ result = elm_webview_show_magnifier_get(webview);
+ evas_object_del(webview);
+ webview = NULL;
+
+ dts_check_eq("elm_webview_show_magnifier_set", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_show_magnifier_set()
+ */
+static void utc_INTERNETFW_elm_webview_show_magnifier_set_func_02(void)
+{
+ Eina_Bool result = EINA_FALSE;
+
+ elm_webview_show_magnifier_set(NULL, EINA_TRUE);
+ result = elm_webview_show_magnifier_get(NULL);
+
+ dts_check_ne("elm_webview_show_magnifier_set", result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *webview;
+
+Eina_Bool g_result = EINA_FALSE;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_stop_func_01(void);
+static void utc_INTERNETFW_elm_webview_stop_func_02(void);
+
+static void loadError(void *data, Evas_Object *webview, void *arg);
+static void loadProgress(void *data, Evas_Object *webview, void *arg);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_stop_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_stop_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_thread_init(NULL);
+ ecore_evas_init();
+ edje_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_resize(main_win, 480, 800);
+ evas_object_show(main_win);
+ ewk_init();
+
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ Evas_Object *view = elm_webview_webkit_view_get(webview);
+ evas_object_show(webview);
+ evas_object_smart_callback_add(view, "load,error", loadError, NULL);
+ evas_object_smart_callback_add(view, "load,progress", loadProgress, NULL);
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+static void loadError(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ tet_printf("[[ TET_MSG ]]:: Oops!! load error is occurred!!\n");
+}
+
+static void loadProgress(void *data, Evas_Object *webview, void *arg)
+{
+ g_result = EINA_TRUE;
+ ecore_main_loop_quit();
+}
+
+/**
+ * @brief Positive test case of elm_webview_stop()
+ */
+static void utc_INTERNETFW_elm_webview_stop_func_01(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ elm_webview_uri_set(webview, "http://webkit.org");
+ ecore_main_loop_begin();
+
+ if (g_result)
+ result = elm_webview_stop(webview);
+ else
+ result = EINA_FALSE;
+
+ dts_check_eq("elm_webview_stop", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_stop()
+ */
+static void utc_INTERNETFW_elm_webview_stop_func_02(void)
+{
+ g_result = elm_webview_stop(NULL);
+ dts_check_ne("elm_webview_stop", g_result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *webview;
+
+Eina_Bool g_result = EINA_FALSE;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_text_matches_highlight_get_func_01(void);
+static void utc_INTERNETFW_elm_webview_text_matches_highlight_get_func_02(void);
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg);
+static void loadError(void *data, Evas_Object *webview, void *arg);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_text_matches_highlight_get_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_text_matches_highlight_get_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_thread_init(NULL);
+ ecore_evas_init();
+ edje_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_resize(main_win, 480, 800);
+ evas_object_show(main_win);
+ ewk_init();
+
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ Evas_Object *view = elm_webview_webkit_view_get(webview);
+ evas_object_show(webview);
+ evas_object_smart_callback_add(view, "load,finished", loadFinished, NULL);
+ evas_object_smart_callback_add(view, "load,error", loadError, NULL);
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ g_result = EINA_TRUE;
+}
+
+static void loadError(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ tet_printf("[[ TET_MSG ]]:: Oops!! load error is occurred!!\n");
+}
+
+/**
+ * @brief Positive test case of elm_webview_text_matches_highlight_get()
+ */
+static void utc_INTERNETFW_elm_webview_text_matches_highlight_get_func_01(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ elm_webview_uri_set(webview, "http://webkit.org");
+ ecore_main_loop_begin();
+
+ elm_webview_text_matches_highlight_set(webview, EINA_TRUE);
+ result = elm_webview_text_matches_highlight_get(webview);
+ dts_check_eq("elm_webview_text_matches_highlight_get", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_text_matches_highlight_get()
+ */
+static void utc_INTERNETFW_elm_webview_text_matches_highlight_get_func_02(void)
+{
+ g_result = elm_webview_text_matches_highlight_get(NULL);
+ dts_check_ne("elm_webview_text_matches_highlight_get", g_result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *webview;
+
+Eina_Bool g_result = EINA_FALSE;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_text_matches_highlight_set_func_01(void);
+static void utc_INTERNETFW_elm_webview_text_matches_highlight_set_func_02(void);
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg);
+static void loadError(void *data, Evas_Object *webview, void *arg);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_text_matches_highlight_set_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_text_matches_highlight_set_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_thread_init(NULL);
+ ecore_evas_init();
+ edje_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_resize(main_win, 480, 800);
+ evas_object_show(main_win);
+ ewk_init();
+
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ Evas_Object *view = elm_webview_webkit_view_get(webview);
+ evas_object_show(webview);
+ evas_object_smart_callback_add(view, "load,finished", loadFinished, NULL);
+ evas_object_smart_callback_add(view, "load,error", loadError, NULL);
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ g_result = EINA_TRUE;
+}
+
+static void loadError(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ tet_printf("[[ TET_MSG ]]:: Oops!! load error is occurred!!\n");
+}
+
+/**
+ * @brief Positive test case of elm_webview_text_matches_highlight_set()
+ */
+static void utc_INTERNETFW_elm_webview_text_matches_highlight_set_func_01(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ elm_webview_uri_set(webview, "http://webkit.org");
+ ecore_main_loop_begin();
+
+ result = elm_webview_text_matches_highlight_set(webview, EINA_TRUE);
+ dts_check_eq("elm_webview_text_matches_highlight_set", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_text_matches_highlight_set()
+ */
+static void utc_INTERNETFW_elm_webview_text_matches_highlight_set_func_02(void)
+{
+ g_result = elm_webview_text_matches_highlight_set(NULL, EINA_TRUE);
+ dts_check_ne("elm_webview_text_matches_highlight_set", g_result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *webview;
+
+Eina_Bool g_result = EINA_FALSE;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_text_matches_mark_func_01(void);
+static void utc_INTERNETFW_elm_webview_text_matches_mark_func_02(void);
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg);
+static void loadError(void *data, Evas_Object *webview, void *arg);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_text_matches_mark_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_text_matches_mark_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_thread_init(NULL);
+ ecore_evas_init();
+ edje_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_resize(main_win, 480, 800);
+ evas_object_show(main_win);
+ ewk_init();
+
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ Evas_Object *view = elm_webview_webkit_view_get(webview);
+ evas_object_show(webview);
+ evas_object_smart_callback_add(view, "load,finished", loadFinished, NULL);
+ evas_object_smart_callback_add(view, "load,error", loadError, NULL);
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ g_result = EINA_TRUE;
+}
+
+static void loadError(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ tet_printf("[[ TET_MSG ]]:: Oops!! load error is occurred!!\n");
+}
+
+/**
+ * @brief Positive test case of elm_webview_text_matches_mark()
+ */
+static void utc_INTERNETFW_elm_webview_text_matches_mark_func_01(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ elm_webview_uri_set(webview, "http://webkit.org");
+ ecore_main_loop_begin();
+
+ if (g_result == EINA_TRUE && elm_webview_text_matches_mark(webview, "WebKit", EINA_FALSE, EINA_TRUE, 0))
+ result = EINA_TRUE;
+ else
+ result = EINA_FALSE;
+ dts_check_eq("elm_webview_text_matches_mark", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_text_matches_mark()
+ */
+static void utc_INTERNETFW_elm_webview_text_matches_mark_func_02(void)
+{
+ g_result = elm_webview_text_matches_mark(NULL, "WebKit", EINA_FALSE, EINA_TRUE, 0);
+ dts_check_ne("elm_webview_text_matches_mark", g_result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *webview;
+
+Eina_Bool g_result = EINA_FALSE;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_text_matches_unmark_all_func_01(void);
+static void utc_INTERNETFW_elm_webview_text_matches_unmark_all_func_02(void);
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg);
+static void loadError(void *data, Evas_Object *webview, void *arg);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_text_matches_unmark_all_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_text_matches_unmark_all_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_thread_init(NULL);
+ ecore_evas_init();
+ edje_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_resize(main_win, 480, 800);
+ evas_object_show(main_win);
+ ewk_init();
+
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ Evas_Object *view = elm_webview_webkit_view_get(webview);
+ evas_object_show(webview);
+ evas_object_smart_callback_add(view, "load,finished", loadFinished, NULL);
+ evas_object_smart_callback_add(view, "load,error", loadError, NULL);
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ g_result = EINA_TRUE;
+}
+
+static void loadError(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ tet_printf("[[ TET_MSG ]]:: Oops!! load error is occurred!!\n");
+}
+
+/**
+ * @brief Positive test case of elm_webview_text_matches_unmark_all()
+ */
+static void utc_INTERNETFW_elm_webview_text_matches_unmark_all_func_01(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ elm_webview_uri_set(webview, "http://webkit.org");
+ ecore_main_loop_begin();
+ if (g_result == EINA_TRUE) {
+ if (elm_webview_text_matches_mark(webview, "WebKit", EINA_FALSE, EINA_TRUE, 0))
+ result = elm_webview_text_matches_unmark_all(webview);
+ else
+ tet_printf("[[ TET_MSG ]]:: Oops!! error !!\n");
+ }
+ else
+ result = EINA_FALSE;
+ dts_check_eq("elm_webview_text_matches_unmark_all", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_text_matches_unmark_all()
+ */
+static void utc_INTERNETFW_elm_webview_text_matches_unmark_all_func_02(void)
+{
+ g_result = elm_webview_text_matches_unmark_all(NULL);
+ dts_check_ne("elm_webview_text_matches_unmark_all", g_result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *webview;
+
+Eina_Bool g_result = EINA_FALSE;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_text_search_func_01(void);
+static void utc_INTERNETFW_elm_webview_text_search_func_02(void);
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg);
+static void loadError(void *data, Evas_Object *webview, void *arg);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_text_search_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_text_search_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_thread_init(NULL);
+ ecore_evas_init();
+ edje_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_resize(main_win, 480, 800);
+ evas_object_show(main_win);
+ ewk_init();
+
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ Evas_Object *view = elm_webview_webkit_view_get(webview);
+ evas_object_show(webview);
+ evas_object_smart_callback_add(view, "load,finished", loadFinished, NULL);
+ evas_object_smart_callback_add(view, "load,error", loadError, NULL);
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ g_result = EINA_TRUE;
+}
+
+static void loadError(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ tet_printf("[[ TET_MSG ]]:: Oops!! load error is occurred!!\n");
+}
+
+/**
+ * @brief Positive test case of elm_webview_text_search()
+ */
+static void utc_INTERNETFW_elm_webview_text_search_func_01(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ elm_webview_uri_set(webview, "http://webkit.org");
+ ecore_main_loop_begin();
+ if (g_result == EINA_TRUE && elm_webview_text_search(webview, "WebKit", EINA_FALSE, EINA_FALSE, EINA_FALSE))
+ result = EINA_TRUE;
+ else
+ result = EINA_FALSE;
+ dts_check_eq("elm_webview_text_search", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_text_search()
+ */
+static void utc_INTERNETFW_elm_webview_text_search_func_02(void)
+{
+ g_result = elm_webview_text_search(NULL, "WebKit", EINA_FALSE, EINA_FALSE, EINA_FALSE);
+ dts_check_ne("elm_webview_text_search", g_result, EINA_TRUE, "failed in negative test case");
+}
}
/**
- * @brief Negative test case of ug_init elm_webview_text_selection_clear()
+ * @brief Negative test case of elm_webview_text_selection_clear()
*/
static void utc_INTERNETFW_elm_webview_text_selection_clear_func_02(void)
{
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *webview;
+
+Eina_Bool g_result = EINA_FALSE;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_title_get_func_01(void);
+static void utc_INTERNETFW_elm_webview_title_get_func_02(void);
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg);
+static void loadError(void *data, Evas_Object *webview, void *arg);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_title_get_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_title_get_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_thread_init(NULL);
+ ecore_evas_init();
+ edje_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_resize(main_win, 480, 800);
+ evas_object_show(main_win);
+ ewk_init();
+
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ Evas_Object *view = elm_webview_webkit_view_get(webview);
+ evas_object_show(webview);
+ evas_object_smart_callback_add(view, "load,finished", loadFinished, NULL);
+ evas_object_smart_callback_add(view, "load,error", loadError, NULL);
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ g_result = EINA_TRUE;
+}
+
+static void loadError(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ tet_printf("[[ TET_MSG ]]:: Oops!! load error is occurred!!\n");
+}
+
+/**
+ * @brief Positive test case of elm_webview_title_get()
+ */
+static void utc_INTERNETFW_elm_webview_title_get_func_01(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ elm_webview_uri_set(webview, "http://webkit.org");
+ ecore_main_loop_begin();
+ if (g_result == EINA_TRUE && elm_webview_title_get(webview))
+ result = EINA_TRUE;
+ else
+ result = EINA_FALSE;
+ dts_check_eq("elm_webview_title_get", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_title_get()
+ */
+static void utc_INTERNETFW_elm_webview_title_get_func_02(void)
+{
+ if (elm_webview_title_get(NULL))
+ g_result = EINA_TRUE;
+ else
+ g_result = EINA_FALSE;
+ dts_check_ne("elm_webview_title_get", g_result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *webview;
+
+Eina_Bool g_result = EINA_FALSE;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_uri_get_func_01(void);
+static void utc_INTERNETFW_elm_webview_uri_get_func_02(void);
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg);
+static void loadError(void *data, Evas_Object *webview, void *arg);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_uri_get_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_uri_get_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_thread_init(NULL);
+ ecore_evas_init();
+ edje_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_resize(main_win, 480, 800);
+ evas_object_show(main_win);
+ ewk_init();
+
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ Evas_Object *view = elm_webview_webkit_view_get(webview);
+ evas_object_show(webview);
+ evas_object_smart_callback_add(view, "load,finished", loadFinished, NULL);
+ evas_object_smart_callback_add(view, "load,error", loadError, NULL);
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ g_result = EINA_TRUE;
+}
+
+static void loadError(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ tet_printf("[[ TET_MSG ]]:: Oops!! load error is occurred!!\n");
+}
+
+/**
+ * @brief Positive test case of elm_webview_uri_get()
+ */
+static void utc_INTERNETFW_elm_webview_uri_get_func_01(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ elm_webview_uri_set(webview, "http://webkit.org");
+ ecore_main_loop_begin();
+ if (g_result == EINA_TRUE && !strncmp(elm_webview_uri_get(webview), "http://webkit.org", strlen("http://webkit.org")))
+ result = EINA_TRUE;
+ else
+ result = EINA_FALSE;
+ dts_check_eq("elm_webview_uri_get", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_uri_get()
+ */
+static void utc_INTERNETFW_elm_webview_uri_get_func_02(void)
+{
+ g_result = EINA_FALSE;
+ elm_webview_uri_set(webview, "http://asddfasdf.org");
+ dts_check_ne("elm_webview_uri_get", g_result, EINA_TRUE, "failed in negative test case");
+}
*
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
*
- * Contact: Ryuan Choi <ryuan.choi@samsung.com>, Eunmi Lee <eunmi15.lee@samsung.com>, Kangil Han <kangil.han@samsung.com>
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// For checking the result of the positive test case.
#define TET_CHECK_PASS(x1, y...) \
{ \
- Evas_Object *err = y; \
- if (err == (x1)) \
- { \
- tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
- tet_result(TET_FAIL); \
- return; \
- } \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
}
// For checking the result of the negative test case.
#define TET_CHECK_FAIL(x1, y...) \
{ \
- Evas_Object *err = y; \
- if (err != (x1)) \
- { \
- tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
- tet_result(TET_FAIL); \
- return; \
- } \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
}
Evas_Object *main_win;
+Evas_Object *webview;
+
+Eina_Bool result = EINA_FALSE;
static void startup(void);
static void cleanup(void);
static void utc_INTERNETFW_elm_webview_uri_set_func_01(void);
static void utc_INTERNETFW_elm_webview_uri_set_func_02(void);
+static void loadFinished(void *data, Evas_Object *webview, void *arg);
+static void loadError(void *data, Evas_Object *webview, void *arg);
+
enum {
- POSITIVE_TC_IDX = 0x01,
- NEGATIVE_TC_IDX,
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
};
struct tet_testlist tet_testlist[] = {
- { utc_INTERNETFW_elm_webview_uri_set_func_01, POSITIVE_TC_IDX },
- { utc_INTERNETFW_elm_webview_uri_set_func_02, NEGATIVE_TC_IDX },
- { NULL, 0 }
+ { utc_INTERNETFW_elm_webview_uri_set_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_uri_set_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
};
static void startup(void)
{
- tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
- g_type_init();
- elm_init(0, NULL);
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- evas_object_show(main_win);
- ewk_init();
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_thread_init(NULL);
+ ecore_evas_init();
+ edje_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_resize(main_win, 480, 800);
+ evas_object_show(main_win);
+ ewk_init();
+
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ Evas_Object *view = elm_webview_webkit_view_get(webview);
+ evas_object_show(webview);
+ evas_object_smart_callback_add(view, "load,finished", loadFinished, NULL);
+ evas_object_smart_callback_add(view, "load,error", loadError, NULL);
}
static void cleanup(void)
{
- if ( NULL != main_win ) {
- evas_object_del(main_win);
- main_win = NULL;
- }
- ewk_shutdown();
- elm_shutdown();
- tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ result = EINA_TRUE;
+}
+
+static void loadError(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ tet_printf("[[ TET_MSG ]]:: Oops!! load error is occurred!!\n");
}
/**
*/
static void utc_INTERNETFW_elm_webview_uri_set_func_01(void)
{
- Evas_Object *webview = NULL;
- Eina_Bool result;
- webview = elm_webview_add(main_win, EINA_TRUE);
- const char uri[20] = "http://webkit.org";
- elm_webview_uri_set(webview, uri);
- const char *uri_from_webkit = ewk_frame_uri_get(ewk_view_frame_main_get(elm_webview_webkit_get(webview)));
-
- // we can not test it without network
- dts_check_eq("elm_webview_uri_set", /*strcmp(uri, uri_from_webkit)*/0, 0, "failed in positive test case");
- evas_object_del(webview);
+ elm_webview_uri_set(webview, "http://m.naver.com");
+ ecore_main_loop_begin();
+ dts_check_eq("elm_webview_uri_set", result, EINA_TRUE, "failed in positive test case");
}
/**
- * @brief Negative test case of ug_init elm_webview_uri_set()
+ * @brief Negative test case of elm_webview_uri_set()
*/
static void utc_INTERNETFW_elm_webview_uri_set_func_02(void)
{
- Evas_Object *webview = NULL;
- Eina_Bool result;
- webview = elm_webview_add(main_win, EINA_TRUE);
- const char uri[20] = "http://webkit.org";
- elm_webview_uri_set(webview, "http://asddfasdf.org");
- const char *uri_from_webkit = ewk_frame_uri_get(ewk_view_frame_main_get(elm_webview_webkit_get(webview)));
-
- // we can not test it without network
- dts_check_ne("elm_webview_uri_set", /*strcmp(uri, uri_from_webkit)*/1, 0, "failed in negative test case");
- evas_object_del(webview);
+ result = EINA_FALSE;
+ elm_webview_uri_set(webview, "http://asddfasdf.org");
+ dts_check_ne("elm_webview_uri_set", result, EINA_TRUE, "failed in negative test case");
}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_use_smart_zoom_get_func_01(void);
+static void utc_INTERNETFW_elm_webview_use_smart_zoom_get_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_use_smart_zoom_get_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_use_smart_zoom_get_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_type_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_show(main_win);
+ ewk_init();
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_webview_use_smart_zoom_get()
+ */
+static void utc_INTERNETFW_elm_webview_use_smart_zoom_get_func_01(void)
+{
+ Evas_Object *webview = NULL;
+ Eina_Bool result = EINA_TRUE;
+ webview = elm_webview_add(main_win, EINA_TRUE);
+
+ elm_webview_use_smart_zoom_set(webview, EINA_TRUE);
+ result = elm_webview_use_smart_zoom_get(webview);
+ evas_object_del(webview);
+ webview = NULL;
+
+ dts_check_eq("elm_webview_use_smart_zoom_get", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_use_smart_zoom_get()
+ */
+static void utc_INTERNETFW_elm_webview_use_smart_zoom_get_func_02(void)
+{
+ Eina_Bool result = EINA_FALSE;
+
+ elm_webview_use_smart_zoom_set(NULL, EINA_TRUE);
+ result = elm_webview_use_smart_zoom_get(NULL);
+
+ dts_check_ne("elm_webview_use_smart_zoom_get", result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_use_smart_zoom_set_func_01(void);
+static void utc_INTERNETFW_elm_webview_use_smart_zoom_set_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_use_smart_zoom_set_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_use_smart_zoom_set_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_type_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_show(main_win);
+ ewk_init();
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_webview_use_smart_zoom_set()
+ */
+static void utc_INTERNETFW_elm_webview_use_smart_zoom_set_func_01(void)
+{
+ Evas_Object *webview = NULL;
+ Eina_Bool result = EINA_TRUE;
+ webview = elm_webview_add(main_win, EINA_TRUE);
+
+ elm_webview_use_smart_zoom_set(webview, EINA_TRUE);
+ result = elm_webview_use_smart_zoom_get(webview);
+ evas_object_del(webview);
+ webview = NULL;
+
+ dts_check_eq("elm_webview_use_smart_zoom_set", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_use_smart_zoom_set()
+ */
+static void utc_INTERNETFW_elm_webview_use_smart_zoom_set_func_02(void)
+{
+ Eina_Bool result = EINA_FALSE;
+
+ elm_webview_use_smart_zoom_set(NULL, EINA_TRUE);
+ result = elm_webview_use_smart_zoom_get(NULL);
+
+ dts_check_ne("elm_webview_use_smart_zoom_set", result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_vertical_panning_hold_get_func_01(void);
+static void utc_INTERNETFW_elm_webview_vertical_panning_hold_get_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_vertical_panning_hold_get_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_vertical_panning_hold_get_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_type_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_show(main_win);
+ ewk_init();
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_webview_vertical_panning_hold_get()
+ */
+static void utc_INTERNETFW_elm_webview_vertical_panning_hold_get_func_01(void)
+{
+ Evas_Object *webview = NULL;
+ Eina_Bool vertical_panning_hold = EINA_TRUE;
+ webview = elm_webview_add(main_win, EINA_TRUE);
+
+ elm_webview_vertical_panning_hold_set(webview, EINA_TRUE);
+ vertical_panning_hold = elm_webview_vertical_panning_hold_get(webview);
+ evas_object_del(webview);
+ webview = NULL;
+
+ dts_check_eq("elm_webview_vertical_panning_hold_get", vertical_panning_hold, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_vertical_panning_hold_get()
+ */
+static void utc_INTERNETFW_elm_webview_vertical_panning_hold_get_func_02(void)
+{
+ Eina_Bool vertical_panning_hold = EINA_FALSE;
+
+ vertical_panning_hold = elm_webview_vertical_panning_hold_get(NULL);
+
+ dts_check_ne("elm_webview_vertical_panning_hold_get", vertical_panning_hold, EINA_TRUE, "failed in negative test case");
+}
}
/**
- * @brief Negative test case of ug_init elm_webview_vertical_panning_hold_set()
+ * @brief Negative test case of elm_webview_vertical_panning_hold_set()
*/
static void utc_INTERNETFW_elm_webview_vertical_panning_hold_set_func_02(void)
{
}
/**
- * @brief Negative test case of ug_init elm_webview_webkit_get()
+ * @brief Negative test case of elm_webview_webkit_get()
*/
static void utc_INTERNETFW_elm_webview_webkit_get_func_02(void)
{
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_webkit_view_get_func_01(void);
+static void utc_INTERNETFW_elm_webview_webkit_view_get_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_webkit_view_get_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_webkit_view_get_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_type_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_show(main_win);
+ ewk_init();
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_webview_webkit_view_get()
+ */
+static void utc_INTERNETFW_elm_webview_webkit_view_get_func_01(void)
+{
+ Evas_Object *webview = NULL;
+ Evas_Object *webkit;
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ webkit = elm_webview_webkit_view_get(webview);
+
+ dts_check_ne("elm_webview_webkit_view_get", webkit, NULL, "failed in positive test case");
+ evas_object_del(webview);
+ webview = NULL;
+}
+
+/**
+ * @brief Negative test case of elm_webview_webkit_view_get()
+ */
+static void utc_INTERNETFW_elm_webview_webkit_view_get_func_02(void)
+{
+ Evas_Object *webkit;
+ webkit = elm_webview_webkit_view_get(NULL);
+
+ dts_check_eq("elm_webview_webkit_view_get", webkit, NULL, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *webview;
+
+Eina_Bool g_result = EINA_FALSE;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_zoom_get_func_01(void);
+static void utc_INTERNETFW_elm_webview_zoom_get_func_02(void);
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg);
+static void loadError(void *data, Evas_Object *webview, void *arg);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_zoom_get_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_zoom_get_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_thread_init(NULL);
+ ecore_evas_init();
+ edje_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_resize(main_win, 480, 800);
+ evas_object_show(main_win);
+ ewk_init();
+
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ Evas_Object *view = elm_webview_webkit_view_get(webview);
+ evas_object_show(webview);
+ evas_object_smart_callback_add(view, "load,finished", loadFinished, NULL);
+ evas_object_smart_callback_add(view, "load,error", loadError, NULL);
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ g_result = EINA_TRUE;
+}
+
+static void loadError(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ tet_printf("[[ TET_MSG ]]:: Oops!! load error is occurred!!\n");
+}
+
+/**
+ * @brief Positive test case of elm_webview_zoom_get()
+ */
+static void utc_INTERNETFW_elm_webview_zoom_get_func_01(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ elm_webview_uri_set(webview, "http://webkit.org");
+ ecore_main_loop_begin();
+ if (g_result == EINA_TRUE) {
+ if (elm_webview_zoom_set(webview, 1.3))
+ result = (elm_webview_zoom_get(webview) != -1);
+ else
+ tet_printf("[[ TET_MSG ]]:: Oops!! error elm_webview_zoom_set!!\n");
+ }
+ else
+ result = EINA_FALSE;
+ dts_check_eq("elm_webview_zoom_get", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_zoom_get()
+ */
+static void utc_INTERNETFW_elm_webview_zoom_get_func_02(void)
+{
+ g_result = (elm_webview_zoom_get(NULL) != -1.0);
+ dts_check_ne("elm_webview_zoom_get", g_result, EINA_TRUE, "failed in negative test case");
+}
--- /dev/null
+/*
+ * Elementary WebView
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jongseok Yang <js45.yang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <tet_api.h>
+#include <glib-object.h>
+#include <Elementary.h>
+#include <Elementary_webview.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *webview;
+
+Eina_Bool g_result = EINA_FALSE;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_INTERNETFW_elm_webview_zoom_set_func_01(void);
+static void utc_INTERNETFW_elm_webview_zoom_set_func_02(void);
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg);
+static void loadError(void *data, Evas_Object *webview, void *arg);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_INTERNETFW_elm_webview_zoom_set_func_01, POSITIVE_TC_IDX },
+ { utc_INTERNETFW_elm_webview_zoom_set_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+ g_thread_init(NULL);
+ ecore_evas_init();
+ edje_init();
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_resize(main_win, 480, 800);
+ evas_object_show(main_win);
+ ewk_init();
+
+ webview = elm_webview_add(main_win, EINA_TRUE);
+ Evas_Object *view = elm_webview_webkit_view_get(webview);
+ evas_object_show(webview);
+ evas_object_smart_callback_add(view, "load,finished", loadFinished, NULL);
+ evas_object_smart_callback_add(view, "load,error", loadError, NULL);
+}
+
+static void cleanup(void)
+{
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ ewk_shutdown();
+ elm_shutdown();
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ g_result = EINA_TRUE;
+}
+
+static void loadError(void *data, Evas_Object *webview, void *arg)
+{
+ ecore_main_loop_quit();
+ tet_printf("[[ TET_MSG ]]:: Oops!! load error is occurred!!\n");
+}
+
+/**
+ * @brief Positive test case of elm_webview_zoom_set()
+ */
+static void utc_INTERNETFW_elm_webview_zoom_set_func_01(void)
+{
+ Eina_Bool result = EINA_FALSE;
+ elm_webview_uri_set(webview, "http://webkit.org");
+ ecore_main_loop_begin();
+ if (g_result == EINA_TRUE && elm_webview_zoom_set(webview, 1.3))
+ result = EINA_TRUE;
+ else
+ result = EINA_FALSE;
+ dts_check_eq("elm_webview_zoom_set", result, EINA_TRUE, "failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of elm_webview_zoom_set()
+ */
+static void utc_INTERNETFW_elm_webview_zoom_set_func_02(void)
+{
+ g_result = elm_webview_zoom_set(NULL, 1.3);
+ dts_check_ne("elm_webview_zoom_set", g_result, EINA_TRUE, "failed in negative test case");
+}
-elm-webview (1.0.186.01) unstable; urgency=low
-
- * Git: slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.186.01
-
- * Jongseok Yang: Add the code for elm_cbhm_xxxxx functions.
- * Changhyup Jwa: Remove unnecessary code - Bug fix
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Wed, 22 Feb 2012 23:32:53 +0900
-
-elm-webview (1.0.186) unstable; urgency=low
-
- * Git: slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.186
-
- * Changhyup Jwa: Portrait & landscape layout by _request_update()
- * Changhyup Jwa: Remove is_layout_set_to_container
- * Eunjoong Jeon: Fix freezing after attach file on myfile ug on browser
- * Gyuyoung Kim: Roll out dpi value
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Wed, 22 Feb 2012 18:13:06 +0900
-
-elm-webview (1.0.185) unstable; urgency=low
-
- * Git: slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.185
-
- * Changhyup Jwa: Apply changed APIs by EFL migration
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Thu, 16 Feb 2012 16:40:55 +0900
-
-elm-webview (1.0.184) unstable; urgency=low
-
- * Git: slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.184
-
- * Changhyup Jwa: Apply changed APIs by EFL migration
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Thu, 16 Feb 2012 12:56:09 +0900
-
-elm-webview (1.0.183) unstable; urgency=low
-
- * Git: slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.183
-
- * Changhyup Jwa: Apply changed APIs by efl migration
- * Changhyup Jwa: call changed_viewport_apply() on viewport changed signal by ecore_job_add
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Wed, 15 Feb 2012 21:52:55 +0900
-
-elm-webview (1.0.182) unstable; urgency=low
-
- * Git: slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.182
-
- * Changhyup Jwa: Revert "Apply changed viewport after nonemptylayout,finished"
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Fri, 10 Feb 2012 14:57:26 +0900
-
-elm-webview (1.0.181) unstable; urgency=low
-
- * Git: slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.181
-
- * Sangwook Jung: Merge "Fix flick operation and extend the total distance"
- * Changhyup Jwa: Apply changed viewport after nonemptylayout,finished
- * Jongseok Yang: Fix flick operation and extend the total distance
- * Seokju Kwon: Text Selection bug fix - disappear handles(front/back) when minimum zoom bouncing
- * Taesik Cho: Merge "Disable DEBUG_FRAMERATE"
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Thu, 09 Feb 2012 23:23:33 +0900
-
-elm-webview (1.0.180) unstable; urgency=low
-
- * Git: slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.180
-
- * Changhyup Jwa : Disable webview's auto resizing
- * Changhyup Jwa : _changed_viewport_apply() with viewport arguments existence
- * Seokju Kwon : Add APIs to enable the magnifier of text selection
-
- -- Seokju Kwon <seokju.kwon@samsung.com> Mon, 06 Feb 2012 20:15:36 +0900
-
-elm-webview (1.0.179) unstable; urgency=low
-
- * Git: slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.179
-
- * Taesik Cho: Merge "Fix double tap immediately after flick"
- * Sangwook Jung: Merge "[Nabi S1-809] Fix the image loadging problem"
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Tue, 31 Jan 2012 18:57:52 +0900
-
-elm-webview (1.0.178) unstable; urgency=low
-
- * Git: slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.178
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Thu, 26 Jan 2012 21:34:23 +0900
-
-elm-webview (1.0.177) unstable; urgency=low
-
- * Git: slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.177
-
- * Hyerim Bae: Fix issue that the context popup isn't invoked because of getting theme fail.
- * Jongseok Yang: Support CSS overflow:scroll
- * Hyerim Bae: Add elm_webview_vertical_panning_hold_get API.
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Tue, 17 Jan 2012 17:30:58 +0900
-
-elm-webview (1.0.176) unstable; urgency=low
-
- * Git: slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.176
-
- * Jongseok Yang: Disable motion UI
- * Changhyup Jwa: Remove ewk_view_zoom_text_only_set() in _smart_add()
- * Seokju Kwon: Remove keywords related to slp and sample using dnet
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Fri, 13 Jan 2012 17:46:20 +0900
-
-elm-webview (1.0.175) unstable; urgency=low
-
- * Git: slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.175
-
- * Jinwoo Song: Merge "Remove pre-rendering from elm-webview"
- * Jinwoo Song: Merge "elm-webview_1.0.174"
- * JungJik Lee: Remove pre-rendering from elm-webview
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Wed, 11 Jan 2012 17:46:10 +0900
-
-elm-webview (1.0.174) unstable; urgency=low
-
- * Git: slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.174
-
- * Jeongah Park: Check whether s_event_data is null or not. CCR ID 9172.
- * Seokju Kwon: Do not allow to move Magnifier out of webview and remove unnecessary code
- * Changhyup Jwa: Set default elm-webview's cairo scaling option as true
- * Ryuan Choi: Make scale page support as optional.
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Mon, 09 Jan 2012 19:10:16 +0900
-
-elm-webview (1.0.173) unstable; urgency=low
-
- * Git: slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.173
-
- * Jinwoo Song: Show the magnifier only when the user makes long press on the text node
- * InBum Chang: Merge "Refactoring for modal_launcher"
- * Jongseok Yang: Refactoring for modal_launcher
- * taesik cho: Nabi S1-138,S1-218
- * Jeongah Park: Add tilt zoom feature.
- * Jinwoo Song: Merge "Add authentication dialog for supporting HTTP 401 Authentication"
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Wed, 04 Jan 2012 11:39:34 +0900
-
-elm-webview (1.0.172) unstable; urgency=low
-
- * Git: slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.172
-
- * Bang Kwangmin: send mouse_up event to plugin using ecore_job
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Tue, 27 Dec 2011 13:40:46 +0900
-
-elm-webview (1.0.171) unstable; urgency=low
-
- * Git: slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.171
-
- * Ryuan Choi: Remove commented code
- * Jinwoo Song: Change the theme name from "nbeat" to "tizen" by UI FW's change
- * Jongseok Yang: Fix scroll event issue
- * Jongseok Yang: Fix problem for touch and mouse event
- * Jinwoo Song: Merge "Change the flick defined value to move longer than now."
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Mon, 19 Dec 2011 10:42:47 +0900
-
-elm-webview (1.0.166) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.166
-
- * Changhyup Jwa: Exception handling for the contents which does not have viewport metatags
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Fri, 09 Dec 2011 19:57:11 +0900
-
-elm-webview (1.0.165) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.165
-
- * Changhyup Jwa: Revert "Now, changed_viewport_apply() is called when "viewport,changed" smart callback is called."
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Thu, 08 Dec 2011 20:43:43 +0900
-
-elm-webview (1.0.164) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.164
-
- * Eunjoong Jeon: Enable multiple file selection and MIME type on FileChooser
- * Hyerim Bae: Remove unnecessary resized webview size check code in _resize_calc_job.
- * Eunmi Lee: Recover wrong removed codes from 9592ef3718dc64abba994a6554bcbde472118ddb.
- * Eunmi Lee: Remove widget_layout's APIs and related codes.
- * Changhyup Jwa: remove _elm_smart_webview_default_encoding_set/get()
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Wed, 07 Dec 2011 18:51:47 +0900
-
-elm-webview (1.0.163) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.163
-
- * Changhyup Jwa: Fix the initialized handler of _focus_ring_invalidate()
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Mon, 05 Dec 2011 20:28:16 +0900
-
-elm-webview (1.0.162) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.162
-
- * taesik cho: remove condition on mouse tap
- * Changhyup Jwa: [CQH0100137655] Prevent incorrect returning ECORE_CALLBACK_CANCEL
- * Kangil Han: Fixed focus ring issue in 'magic land island' game.
- * Bae Hyerim: Fix to call _zoom_to_rect properly in case of the input method changed event.
- * Kangil Han: Adapted 'apache license' boilerplate to elm-webview package.
- * Jinwoo Song: Merge changes Iee29f3a0,Ibffe8c9e
- * Ryuan Choi: Remove elm_webview_bounce_set which is not used anywhere and do nothing
- * Jinwoo Song: Merge "[CQ-H0100137637] Fix an issue of text selection : displaying handles of text selection when TEXT_SELECTION_OFF"
- * Ryuan Choi: Remove commented code and unused variables
- * Seokju Kwon: [CQ-H0100137637] Fix an issue of text selection : displaying handles of text selection when TEXT_SELECTION_OFF
- * Ryuan Choi: Remove deprecated APIs and related code
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Mon, 05 Dec 2011 20:02:56 +0900
-
-elm-webview (1.0.161) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.161
-
- * Jeongah Park: EWK API name is changed. Change the ewk_view_get_smart_zoom_rect to ewk_view_smart_selection_rect_get.
- * Michal Pakula vel Rutka: elm_webview_sample context menu support
- * Kangil Han: [CQ H0100137634] Fixed HTML pasting issue in WebView.
- * Ryuan Choi: Remove Sangseok from AUTHORS
- * Ryuan Choi: Fix broken text when user mistake defaultValue.
- * Jinwoo Song: Merge "Now, changed_viewport_apply() is called when "viewport,changed" smart callback is called. And remove unnecessary code - _smart_load_nonemptylayout_finished() Change-Id: I2383ed06c6e0446d3a814c6c5c73a1cb5efab46f"
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Thu, 01 Dec 2011 19:26:37 +0900
-
-elm-webview (1.0.160) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.160
-
- * taesik cho: CQID : H0100137327
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Mon, 28 Nov 2011 22:08:29 +0900
-
-elm-webview (1.0.159) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.159
-
- * Junghwan Kang : Fixing myfiles UG launch issue in modal launcher
- * Michał Pakuła vel Rutka : Text selection mode change improvement
-
- -- Junghwan Kang <junghwan.kang@samsung.com> Fri, 25 Nov 2011 22:20:32 +0900
-
-elm-webview (1.0.158) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.158
-
- * Seokju Kwon: Emit the signal for displaying front and back handles of text selection
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Thu, 24 Nov 2011 20:48:54 +0900
-
-elm-webview (1.0.157) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.157
-
- -- Kangil Han <kangil.han@samsung.com> Mon, 21 Nov 2011 20:50:20 +0900
-
-elm-webview (1.0.156) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.156
-
- * Junghwan Kang : Add Junghwan Kang to webview-maintainer for Modal Launcher
- * Kangil Han : Fixed viewport problem while merging open source commits to SLP WebKit. ewk_view_viewport_attributes_get function has changed its parameters regarding layout width and height from float to int type.
- * Junghwan Kang : Turn off the flag to not set window effect for modal launcher (Fixing CQ : H0100136927)
-
- -- Junghwan Kang <junghwan.kang@samsung.com> Mon, 21 Nov 2011 19:09:43 +0900
-
-elm-webview (1.0.155) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.155
-
- * taesik cho: 1. If greater than the width of the editor, the size of the image resized to 95% of the editor
- * Jinwoo Song: Merge "Text selection bug fix"
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Fri, 18 Nov 2011 16:31:57 +0900
-
-elm-webview (1.0.154) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.154
-
- * Grzegorz Czajkowski: Focus ring is not shown on the editable areas.
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Thu, 17 Nov 2011 20:16:25 +0900
-
-elm-webview (1.0.153) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.153
-
- * taesik cho: 1. If greater than the width of the editor, the size of the image resized to 95% of the editor, otherwise keep the size of the image
- * Grzegorz Czajkowski: Focus ring is not shown on the editable areas.
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Thu, 17 Nov 2011 19:49:53 +0900
-
-elm-webview (1.0.152) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.152
-
- * Jinwoo Song: Merge "Delete the contextmenu smart callbacks when destroys the Elm_Webview_Editor object"
- * Changhyup Jwa: Delete the contextmenu smart callbacks when destroys the Elm_Webview_Editor object
- * Grzegorz Czajkowski: Focus ring improvements.
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Tue, 15 Nov 2011 21:22:37 +0900
-
-elm-webview (1.0.151) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.151
-
- -- jeongah <jeongah@jeongah.park@samsung.com> Fri, 11 Nov 2011 17:57:57 +0900
-
-elm-webview (1.0.150) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.150
-
- * Jeongah Park: Mouse up need to be called due to click problem in daum site.
- * Jeongah Park: Using the rect[2] instead of rect[0] because rect[0] value is not correct, so hit test can be failed.
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Fri, 11 Nov 2011 16:49:01 +0900
-
-elm-webview (1.0.149) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.149
-
- * Jeongah Park: Hide IME when context menu is appeared. And call the fuctions related to text selection when text seleciton is on.
- * Jeongah Park: Remove the scrolling routine while smart zooming.
- * Grzegorz Czajkowski: Fix defects discovered by Klocwork
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Mon, 31 Oct 2011 20:20:37 +0900
-
-elm-webview (1.0.148) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.148
-
- * Jeongah Park: Change the y position of the input field due to Twitter.
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Wed, 26 Oct 2011 14:05:39 +0900
-
-elm-webview (1.0.147) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.147
-
- * Jinwoo Song: Fix the elm_webview_layout_width_set_to_container()
- * Michal Pakula vel Rutka: Added pasting images from context menu
- * Kangil Han: Added logic to use editor command of inserting image
-
- -- Changhyup <ch.jwa@samsung.com> Mon, 24 Oct 2011 20:15:48 +0900
-
-elm-webview (1.0.146) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.146
-
- * Jeongah Park: Fixed smart object name due to BS in email.
- * Changhyup Jwa: Add dlogs to each of els_touch's EVAS callbacks
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Mon, 24 Oct 2011 10:20:00 +0900
-
-elm-webview (1.0.145) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.145
-
- * Grzegorz Czajkowski: Focus ring is hidden after click on links
- * Kangil Han: Added work-around source lines to distinguish text/image
- * Kangil Han: Changed default text selection handle theme as selected in settings menu.
- * Jinwoo Song: Modify the input filed zoom behavior
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Thu, 20 Oct 2011 22:25:11 +0900
-
-elm-webview (1.0.144) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.144
-
- * Jinwoo Song: Merge "Temp patch for Emberwind - Touch mode for Emberwind is enabled by the URL (operasoftware.github.com/Emberwind)"
- * Changhyup Jwa: Temp patch for Emberwind
- * Jinwoo Song: Merge "Bug fix for "two,move,end" operation(Google map bug) - _smart_emit_two_move_end() always passes MOUSEUP position to webview. it never passes MULTIUP position to webview. - Fix: Pass proper event(MouseUp and MultiUp) position to webview"
- * Changhyup Jwa: Bug fix for "two,move,end" operation(Google map bug)
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Wed, 12 Oct 2011 17:27:32 +0900
-
-elm-webview (1.0.143) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.143
-
- * Kangil Han: Clears context menu when virtual keyboard is forced to hiding by user.
- * Byungwoo Lee: Add api for horizontal panning lock & Add signal (edge,left / edge,right)
- * Jeongah Park: Apply gesture layer algorithm. - Calculation zoom ratio
- * Jeongah Park: Change the min/max ratio because webkit's supporting ratio is changed.
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Tue, 11 Oct 2011 21:01:58 +0900
-
-elm-webview (1.0.142) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.142
-
- * Jeongah Park: Call touch_up and do not send multi touch event for Emberwind. For playing Emberwind, define the EMBERWIND.
- * Jeongah Park: Increase the zoom ratio when zooming rate is over 3.0.
- * Jinwoo Song: Merge "Change the navigationbar API to naviframe API."
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Wed, 05 Oct 2011 19:43:57 +0900
-
-elm-webview (1.0.141) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.141
-
- * Michal Pakula vel Rutka: Context menu on image in editable fields fix
- * Jinwoo Song: Fix the wrong return type
- * Jeongah Park: Do not need checking double click event flag.
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Tue, 04 Oct 2011 09:41:27 +0900
-
-elm-webview (1.0.140) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.140
-
- * Jinwoo Song: Add APIs to set/get the default encoding of the webview
- * Kangil Han: Adds environment shell lines to enable launching TC on target
- * Jeongah Park: When loading the page, resume_all is called even panning or zooming is still going on. To prevent calling resume_all when panning and zooming are off.
- * Choi Ryuan: Remove and deprecated unused code.
- * Jeongah Park: Jeongah Park
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Thu, 29 Sep 2011 18:20:52 +0900
-
-elm-webview (1.0.139) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.139
-
- * Jinwoo Song: Add new API for set/get WRT widget layout
- * Jinwoo Song: Merge "Fix avoiding warnings in els_webview_editor_cbhm_run"
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Mon, 26 Sep 2011 17:22:05 +0900
-
-elm-webview (1.0.138) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.138
-
- * Jinwoo Song: Revert the resume_all patch which cause the side effect.
- * Kangil Han: Removes build warning messages.
- * Jeongah Park: When loading the page, resume_all is called even panning is still going on. To prevent, adding the condition not to call resume all when panning is on.
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Fri, 23 Sep 2011 17:37:44 +0900
-
-elm-webview (1.0.137) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.137
-
- * Changhyup Jwa: Patch for duplicated geolocation popup crash
- * Jeongah Park: Fixed prevent issue
- * Junghwan Kang: Make it to display detailed certificate error in modal popup
- * Junghwan Kang: Make modal-launcher has opacity to display caller application and block rotating steps to avoid differency of rotate status between modal launcher and caller app.
- * Jinwoo Song: Merge "Text selection clipboard and popup fix"
- * Michal Pakula vel Rutka: Text selection clipboard and popup fix
- * Junghwan Kang: Make it to apply LCD rotate status in modal launcher starting
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Sat, 17 Sep 2011 09:46:22 +0900
-
-elm-webview (1.0.136) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.136
-
- * Michal Pakula vel Rutka: Select all fix
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Fri, 09 Sep 2011 16:23:25 +0900
-
-elm-webview (1.0.135) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.135
-
- * Michal Pakula vel Rutka: Text selection bugfix
- * Jeongah Park: Recalculate focused_rect due to focusing input field when webview is rotated.
- * Mike McCormack: Add packaging
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Thu, 08 Sep 2011 09:52:21 +0900
-
-elm-webview (1.0.134) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.134
-
- * Jinwoo Song: Merge "Fix zoom_set's center position because SLP_WRONG_CALCULATION_FIX patch is removed from webkit engine. So, we have to calculate the center position as a relative position of webview."
- * Eunmi Lee: Fix zoom_set's center position
- * Michal Pakula vel Rutka: Text selection left handle position fix
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Mon, 05 Sep 2011 21:03:57 +0900
-
-elm-webview (1.0.133) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.133
-
- * jungjik.lee: Fast zoom bound
- * Michal Pakula vel Rutka: Autofocus enable/disable feature
-
- -- Kangil Han <kangil.han@samsung.com> Thu, 01 Sep 2011 18:40:49 +0900
-
-elm-webview (1.0.132) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.132
-
- * Jeongah Park: Do not call panning when the page is using TOUCH_START event.
- * Mariusz Grzegorczyk: Pause plugin when selected, but move, or zoom was outside it
- * Michal Pakula vel Rutka: Text selection magnifier fix
- * sang seok lim: Merge " Page is loaded horizontally and roate it more than two times, then the zoom level is decreased."
- * Kangil Han: Removes 'elm_label_background_color_set' function used in '_prompt' function.
- * Ryuan Choi: Merge "Add , in editorclient signals"
- * Ryuan Choi: Add , in editorclient signals
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Wed, 31 Aug 2011 16:42:04 +0900
-
-elm-webview (1.0.131) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.131
-
- * Junghwan Kang: Fix modal-launcher pausing issue : unable to resume browser application after modal-launcher paused
- * Kangil Han: Fixes inappropriate page view issue on repeated rotation.
- * Ryuan Choi: Remove warnings and reorder header list
- * Michal Pakula vel Rutka: Text selection two handles fix
- * Michal Pakula vel Rutka: els webview editor refactoring
- * Ryuan Choi: Remove elm_priv.h by using elm_widget.h
- * Ryuan Choi: Clear API_ENTRY.
- * Jeongah Park: Call stop_all_animator function when go to none state. Emit second down event because flash plugin needs it.
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Fri, 26 Aug 2011 16:58:44 +0900
-
-elm-webview (1.0.130) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.130
-
- * Michal Pakula vel Rutka: Magnifier bug fix
- * Grzegorz Czajkowski: elm_webview_fixed_position_get checks plugin mode
- * Bang Kwangmin: call _resume_all when ended zoomming although flashmode.
-
- -- Kangil Han <kangil.han@samsung.com> Fri, 19 Aug 2011 12:58:38 +0900
-
-elm-webview (1.0.129) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.129
-
- * Kangil Han: Makes every animator value become NULL after deletion to prevent unintended access.
-
- -- Kangil Han <kangil.han@samsung.com> Tue, 16 Aug 2011 19:07:04 +0900
-
-elm-webview (1.0.128) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.128
-
- * Jeongah Park: Using API to check webview visibility, and initialize the latest_min_zoom_rate variable
- * Jeongah Park: Long press move animator does not stop when multi-up event is occured.
- * Jeongah Park: Fixed prevent issues and resume visible webview due to inactive window's flashplayer playing
- * Ryuan Choi: ewk_frame_contents_size_get returns zoomed size if scale page was enabled
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Fri, 12 Aug 2011 18:07:22 +0900
-
-elm-webview (1.0.127) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.127
-
- * Ryuan Choi: Change deprecated api 'ewk_view_select_none'
- * Jongseok Yang: Remove "Eina_list *suggested_filenames" argument for functions to open
- * Michal Pakula vel Rutka: Text selection mode change refactoring
- * Michal Pakula vel Rutka: Text selection migration
- * Kangil Han: Adapts Nbeat layout style guide and resolves fragmentation fault on elm_webview_sample.
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Mon, 08 Aug 2011 14:40:33 +0900
-
-elm-webview (1.0.126) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.126
-
- * Kamil Blank: Replace removed WebKit API by new one.
- * Kangil Han: This is work-around patch that will be valid until EWebKit viewport is ready to calculate whole zoom related stuff instead of WebView.
- * Eunmi Lee: remove ewk_tile_unused_cache_auto_flush - it is deprecated API
- * Eunmi Lee: remove CTBS codes - it is not used anymore
- * sang seok lim: Merge "remove old CTXPOPUP codes - it is not used anymore"
- * Jeongah Park: Apply smooth algorithm for pinch zooming and panning
- * Eunmi Lee: remove old CTXPOPUP codes - it is not used anymore
- * Michal Pakula vel Rutka: Text selection bug fixing
- * sang seok lim: Merge "Apply delay to the flick algorithm. We do not want to flick with normal amount of distance when there is a delay before flick, because it seems strange and looks like jumping. So, we apply delay to the flick average distance with guaranteeing the minimum flick distance(FLICK_THRESHOLD)."
- * Michal Pakula vel Rutka: Changes to apply Select and Select all in context menu
- * Eunmi Lee: Apply delay to the flick algorithm.
- * Kangil Han: Updates deprecated API.
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Mon, 01 Aug 2011 15:16:35 +0900
-
-elm-webview (1.0.125) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.125
-
- * Jinwoo Song: Remove basename from log.h to resolve the defect in the Prevent
- * Ryuan Choi: Remove -march=armv7-a -mtune=cortex-a8
- * Ryuan Choi: Remove macro constants which define some resource file path which doesn't exist.
- * Mariusz Grzegorczyk: [Plugins] Prevent pausing plugin when zooming over it, pass mouse events to plugin from native ones
- * Sangwook Jung: Merge "To add amended boiler-plate for code open"
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Mon, 25 Jul 2011 19:48:05 +0900
-
-elm-webview (1.0.124) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.124
-
- * Jeongah Park: Remove unnecessary code because the viewport implementation is done
- * Sangwook Jung: Merge "Remove unnecessary files els_webview_container is not used, remove it. - els_webview_container.c and els_webview_container.h is removed. - and update CMakeLists.txt"
- * Gyuyoung Kim: Revert Revert apply webkit-engine's viewport with dpi - initial version
- * Jwa Changhyup: Remove unnecessary files
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Tue, 19 Jul 2011 17:37:00 +0900
-
-elm-webview (1.0.123) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.123
-
- * Jeongah Park: Fixed the prevent issue
- * Eunmi Lee: code clean up - remove tabs
- * Eunmi Lee: Fix 'move history' algorithm.
- * Eunmi Lee: "single,tap" event for e-mail html composer.
- * sangseok lim: to genenerate onscroll event at the end of panning when onscroll event occurrence is prevented while panning
- * sang seok lim: Merge "Send release event. Problem found in mobile daum site."
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Thu, 14 Jul 2011 20:22:20 +0900
-
-elm-webview (1.0.122) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.122
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Mon, 11 Jul 2011 15:00:09 +0900
-
-elm-webview (1.0.121) unstable; urgency=low
-
- * KwangHyuk Kim: Merge "Use notification about change in handling events by plugins"
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.121
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Mon, 11 Jul 2011 14:21:26 +0900
-
-elm-webview (1.0.120) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.120
-
-* Jeongah Park: Change the input field zoom routine in case the input field is located at bottom of the page
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Thu, 07 Jul 2011 19:56:46 +0900
-
-elm-webview (1.0.119) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.119
-
- * Mariusz Grzegorczyk: A new model of events for plugins
- * Kangil Han: To change WebView auto zoom concept in screen rotation. With this, zoom level larger than minimum one should be set as ratio on width change in screen rotation.
- * Michal Pakula vel Rutka: Do not clear selection on NULL input method state
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Mon, 04 Jul 2011 16:41:52 +0900
-
-elm-webview (1.0.118) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.118
-
- * Michal Pakula vel Rutka: elm_webview_fixed_position_get fix
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Mon, 27 Jun 2011 20:17:09 +0900
-
-elm-webview (1.0.117) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.117
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Tue, 21 Jun 2011 20:29:47 +0900
-
-elm-webview (1.0.116) unstable; urgency=low
-
- * sang seok lim : Merge "Moving set text selection off from job to callback"
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Tue, 21 Jun 2011 20:11:23 +0900
-
-elm-webview (1.0.115) unstable; urgency=low
-
- * Ryuan Choi : fix blackscreen when called window.prompt(...)
- * Ryuan Choi : Get content size of 1.0 point when cairo scaling is diabled.
- * Kangil Han : To resolve odd scroll action on text selection magnifier mode
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Tue, 21 Jun 2011 17:29:20 +0900
-
-elm-webview (1.0.114) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.114
-
- * sang seok lim : Merge "Add Changhyup Jwa as maintainer of elm-webview"
- * Jinwoo Song : Fix the jumping problem when flicking the long sites
- * Changhyup Jwa : Add Changhyup Jwa as maintainer of elm-webview
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Mon, 20 Jun 2011 09:50:51 +0900
-
-elm-webview (1.0.113) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.113
-
- * Eunmi Lee : move _parent_sc.mouse_down for events_feed from _smart_cb_mouse_down to _smart_mouse_down
- * Michal Pakula vel Rutka : text selection - new selection type distingushing
- * Mariusz Grzegorczyk : Remove creating html for swf file while loading from file:// protocol. Not needed after following change in webkit-engine: Change I7049f4f9: Allow displaying plugin's resource from web e.g. ...swf
- * Mariusz Grzegorczyk : Fix build break
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Thu, 16 Jun 2011 20:00:06 +0900
-
-elm-webview (1.0.112) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.112
-
- * Jeongah Park : Remove minimum zoom bouncing animation and stop zooming when one of the fing
- * Ryuan Choi : remove neon option
-
- -- Changhyup Jwa <ch.jwa@samsung.com> Tue, 14 Jun 2011 18:55:05 +0900
-
-elm-webview (1.0.111) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.111
-
- * Hyerim Bae : Add javascript & mobile layout variable to Elm_WebView_Create_Webview_Data for create webview option
-
- -- Kangil Han <kangil.han@samsung.com> Mon, 13 Jun 2011 19:20:58 +0900
-
-elm-webview (1.0.110) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.110
-
- * Grzegorz Czajkowski : selection_clear returns ECORE_CALLBACK_PASS_ON
- * Kangil Han : To resolve flickr application rotate issue
-
- -- Kangil Han <kangil.han@samsung.com> Thu, 09 Jun 2011 20:00:14 +0900
-
-elm-webview (1.0.109) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.109
-
- * Hyerim Bae : Change the create webviwe webkit callback
- * Jeongah Park : Select field zoom implementation and rename the variables which can be used in common
- * Grzegorz Czajkowski : Apply Klocwork suggestions
-
- -- Kangil Han <kangil.han@samsung.com> Tue, 07 Jun 2011 21:04:30 +0900
-
-elm-webview (1.0.108) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.108
-
- * Eunmi Lee : remove bluetooth mouse_move support patch because we will not support mouse hover
-
- -- Kangil Han <kangil.han@samsung.com> Thu, 02 Jun 2011 18:23:37 +0900
-
-elm-webview (1.0.107) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.107
-
- * Change null parent of elm_popup_add to ad->win
- * Stop the panning when the touch event feeds to webkit engine
-
- -- Kangil Han <kangil.han@samsung.com> Fri, 27 May 2011 11:20:56 +0900
-
-elm-webview (1.0.106) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.106
-
- * To fix twitter.com zoom issue
-
- -- Kangil Han <kangil.han@samsung.com> Thu, 26 May 2011 08:36:25 +0900
-
-elm-webview (1.0.105) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.105
-
- * Text selection bugfix. This fixes bug when a popup mode was not called on input field
-
- -- Kangil Han <kangil.han@samsung.com> Mon, 23 May 2011 11:33:25 +0900
-
-elm-webview (1.0.104) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.104
-
- * Fixed build break. Copied elm_priv.h from elementary package.
-
- -- jeongah <jeongah.park@samsung.com> Thu, 19 May 2011 11:26:01 +0900
-
-elm-webview (1.0.103) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.103
-
- * we have to pass the TOUCH_POINT_MOVED for one_move_start (not TOUCH_POINT_PRESSED),
-because TOUCH_POINT_PRESSED is passed in the smart_cb_mouse_down.
-and move touch_event_feed checking code to the one_move_start from one_move
- * remove 'resize for keyboard' codes
-
- -- Kangil Han <kangil.han@samsung.com> Tue, 17 May 2011 22:04:27 +0900
-
-elm-webview (1.0.102) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.102
-
- * extract pre-rendering code to ewk (modified)
-
- -- Kangil Han <kangil.han@samsung.com> Mon, 16 May 2011 14:03:27 +0900
-
-elm-webview (1.0.101) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.101
-
- * [modal_launcher]create ad->win always
-
- -- Kangil Han <kangil.han@samsung.com> Thu, 12 May 2011 18:26:22 +0900
-
-elm-webview (1.0.100) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.100
-
- * In case of page moved, using the rect even the x and width are the same as the last rect's x and width.Change to debug macro and apply webkit coding style
- * Scroll the page when the zoom_step is under boundary and it is smartzoom
-
- -- Kangil Han <kangil.han@samsung.com> Wed, 11 May 2011 18:08:12 +0900
-
-elm-webview (1.0.99) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.99
-
- * Revert "apply webkit-engine's viewport with dpi - initial version"
-
- -- Kangil Han <kangil.han@samsung.com> Tue, 03 May 2011 21:13:34 +0900
-
-elm-webview (1.0.98) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.98
-
- * apply webkit-engine's viewport with dpi - initial version
-
- -- Kangil Han <kangil.han@samsung.com> Mon, 02 May 2011 17:04:34 +0900
-
-elm-webview (1.0.97) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.97
-
- * Add the smart zoom on/off functions
- * add Kangil Han as a maintainer of elm-webview
- * remove unused macro
- * Clipboard manager bug fix
- * Fixed text selection panning issue
- * modify TC script for SBS2 and gcc 4.5.2
- * Merge "pass the one,press for mouse_down during drag the flash plug-in can not get the mouse_down during drag without this patch."
- * Merge "drop load,finished callback because webview doesn't need to make error page anymore, Error page make WebCore side"
-
- -- Kangil Han <kangil.han@samsung.com> Mon, 02 May 2011 11:38:34 +0900
-
-elm-webview (1.0.96) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.96
-
- * Add libgnutls-dev to control
-
- -- Eunmi <eunmi15.lee@samsung.com> Sat, 23 Apr 2011 20:11:29 +0900
-
-elm-webview (1.0.95) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.95
-
- * Add libgnutls-dev to control
-
- -- Gyuyoung Kim <gyuyoung.kim@samsung.com> Sat, 23 Apr 2011 20:03:54 +0900
-
-elm-webview (1.0.94) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.94
-
- * re-upload for upgraded webkit-engine
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Sat, 23 Apr 2011 13:41:25 +0900
-
-elm-webview (1.0.93) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.93
-
- * Check for plugin mode on all mouse downs
- * change the TC functions name
- * fix the sample's build script for sbs2
- * Disabled CTBS macro due to tbs2&tbs1 integration
- * remove ewk_view_stop from _smart_load_error
- because it will cause crash with upgraded webkit-engine
- * create Evas_Event_Mouse_Down event for smart_cb_mouse_down
- * hibrain.net selection issue fix
- * H0100124922 issue fix
- * delete selection_clear ecore_event_handler when webview is deleted
- * do not pass the mouse_down during text-selection
- * Change condition to get/set empty proxy address (Null or 0.0.0.0)
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Fri, 22 Apr 2011 20:37:26 +0900
-
-elm-webview (1.0.92) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.92
-
- * Add new html script for service unavailable case
- * Removed code due to moved it into WebKit library.
- See: 'Global tiled view cache manager feature' commit
- * Removed an old comment
- * Preparation before tbs2 and tbs1 integration
- * fix TC errors
- * [modal_launcher]fix for CR support
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Mon, 18 Apr 2011 20:21:18 +0900
-
-elm-webview (1.0.91) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.91
-
- * fix the indentation to follow the elementary rule
- * remove minimap related codes because minimap API is deprecated
- * Direct events handling for plugins
- * remove two_press_timer because we do not have to delay two press
- * remove events_block related code because that is deprecated
- * wordpress.com input field issue fix
- * if on_panning is true, set mouse_up's position to (0, 0)
- * modify move threshold checking code to use _elm_config's thumbscroll_threshold
- * set size_hint_min as same as object size
- and resize webview instead of webkit for keyboard
- * remove duplicated plug-in checking code
- * Prevent double mouse_up sending on active plugin
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Thu, 07 Apr 2011 09:35:20 +0900
-
-elm-webview (1.0.90) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.90
-
- * if mouse down is propagated,
- we have to propagate mouse_up to keep the mouse up/down pair
- * fix the wrong API parameter
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Mon, 04 Apr 2011 21:27:13 +0900
-
-elm-webview (1.0.89) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.89
-
- * add variables to use elm-webview.pc.in and remove unnecessary files
- * remove malloc for Ewk_Touch_Point.
- It's not clean yet, but it wil remove huge memory leak.
- * possible leaks with text selection
- * Text selection modes ecore_job bugfixing
- * move mouse down delay code to the els_weview from els_touch
- and do not propagate mouse down for double tap
- * remove ewk_init()
- * remove event->flags checking code for mouse_down
- * add use_mouse_down_delay_set/get API
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Mon, 04 Apr 2011 20:26:19 +0900
-
-elm-webview (1.0.88) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.88
-
- * Fix build error
-
- -- Jeongah Park <jeongah.park@samsung.com> Wed, 30 Mar 2011 19:33:47 +0900
-
-elm-webview (1.0.87) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.87
-
- * Fix build error
-
- -- Jeongah Park <jeongah.park@samsung.com> Wed, 30 Mar 2011 15:47:41 +0900
-
-elm-webview (1.0.86) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.86
-
- * change autotools to cmake
- * add sample for checking memory while loading
- * apply dlog
- * remove flick velocity revising code
- * remove unused variable
- * add memory increment case
- * Fix for korean keyboard bug
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Wed, 30 Mar 2011 08:35:22 +0900
-
-elm-webview (1.0.85) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.85
-
- * Changes in magnifier width
- * Changes to allow/bugfix image copy from editable
- Added support for content editable image copy -
- popup will be similiar to one from text selection
- * apply caret location for zooming to input field rect
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Mon, 28 Mar 2011 19:19:11 +0900
-
-elm-webview (1.0.84) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.84
-
- * repackaging for new webkit-engine package
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Wed, 23 Mar 2011 22:30:46 +0900
-
-elm-webview (1.0.83) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.83
-
- * Paste image feature into content editable
- * deprecate elm_webview_minimap_get API
- * move html defines to the separate header file
- * remove ime show/hide code and ime blocking code
- * zoom to the input field in the "inputmethod,changed" event callback
- instead of tap and long,press callback
- * deprecate unnecessary APIs (events_block_set/get)
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Wed, 23 Mar 2011 21:31:42 +0900
-
-elm-webview (1.0.82) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.82
-
- * Text selection refactoring
- * This fixes text selection handles move in editable area
- * add flash plugin's input field zoom feature
- * modify center of zoom from (0, 0) to webview's left corner position
- * modify wrong tc names in the tslist
- * do not suspend in the mouse_down
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Fri, 18 Mar 2011 20:27:39 +0900
-
-elm-webview (1.0.81) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.81
-
- * we do not have to revise center position here
- caused by backing store's wrong calculation code
- * add maintainer
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Mon, 14 Mar 2011 20:05:44 +0900
-
-elm-webview (1.0.80) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.80
-
- * Pre-rendering issue Calling ewk_view_setting_encoding_custom_set before page is loaded
- * Add pkg-config modules needed for linking
- * fix the input field zoom defect
- * remove unreachable code
- * remove object width revising code
- * modify evas coordinate variables' type
- from int to Evas_Coord to prevent confusion
- * add comments for smart_zoom
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Fri, 11 Mar 2011 19:38:33 +0900
-
-elm-webview (1.0.79) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.79
-
- * Pre-rendering only on load finished event
- * rename TC from UIFW to INTERNETFW
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Wed, 09 Mar 2011 18:08:09 +0900
-
-elm-webview (1.0.78) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.78
-
- * Add control logic for KEY_END.
- * apply MAX_FLICK_DISTANCE and set it to 160 pixel
- * always set ewk_view's zoom range as same as elm-webview's min/max zoom
- * unify bouncing zooming step with normal zooming step
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Wed, 09 Mar 2011 10:03:29 +0900
-
-elm-webview (1.0.77) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.77
-
- * Text selection fix for H0100120997
- * process move directly without ecore_job
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Thu, 03 Mar 2011 22:49:19 +0900
-
-elm-webview (1.0.76) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.76
-
- * Change because of Refactoring ewk_frame_selection apis.
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Wed, 02 Mar 2011 19:20:09 +0900
-
-elm-webview (1.0.75) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.75
-
- * Text selection magnifier bugfix
- * Fix H0100121733 : Fixed sweep-hiding keyboard issue plus added
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Mon, 28 Feb 2011 21:49:37 +0900
-
-elm-webview (1.0.74) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.74
-
- * Replace mouse_clicked to buttons of Evas_Mouse_Move.
- * Patch allowing magnifier to move over editable fields and fix wrong #endif position
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Thu, 24 Feb 2011 21:59:51 +0900
-
-elm-webview (1.0.73) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.73
-
- * Text selection bug fixing
- This fixes some text selection bugs mainly text handles positioning
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Tue, 22 Feb 2011 22:02:05 +0900
-
-elm-webview (1.0.72) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.72
-
- * modify error page's title to 'Error Page'
- * suspend all in the mouse down instead of pan,start, zoom,start
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Mon, 21 Feb 2011 19:50:33 +0900
-
-elm-webview (1.0.71) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.71
-
- * fix the prevent defect
- * [modal_launcher]add exceptional handling
- * IME fix - Fix showing keyboard for content editable in html5demos.com
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Fri, 18 Feb 2011 21:49:55 +0900
-
-elm-webview (1.0.70) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.70
-
- * add framerate debuging code
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Wed, 16 Feb 2011 18:42:08 +0900
-
-elm-webview (1.0.69) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.69
-
- * do not adjust layout in wrt widget case (file://) in the load,finsihed callback
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Sat, 12 Feb 2011 00:13:20 +0900
-
-elm-webview (1.0.68) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.68
-
- * fix the prevent defects
- * feed touch event only for one,move
- * add test cases
- * Adjust width of page content when content's widht is different than viewport's
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Fri, 11 Feb 2011 22:32:41 +0900
-
-elm-webview (1.0.67) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.67
-
- * change IME layout in case of NUMBER type
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Wed, 09 Feb 2011 22:47:16 +0900
-
-elm-webview (1.0.66) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.66
-
- * IME show fix
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Wed, 09 Feb 2011 21:53:54 +0900
-
-elm-webview (1.0.65) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.65
-
- * Text selection magnifier bugfixing
- * fix the zoom_rate setting code
- * H0100119277 - fixing size of a webview width when keyboard is activated
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Wed, 09 Feb 2011 15:59:20 +0900
-
-elm-webview (1.0.64) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.64
-
- * set fixed_layout_size for desktop site
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Mon, 07 Feb 2011 13:58:33 +0900
-
-elm-webview (1.0.63) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.63
-
- * IME show fix
- Moved showing keyboard from directly just after receiving a callback
- from WebKit (literally mouse down) to mouse tap gesture (after
- mouse down)
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Tue, 01 Feb 2011 18:46:25 +0900
-
-elm-webview (1.0.62) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.62
-
- * add content rect checking code in the directional_pre_render and check min_zoom_rate
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Fri, 28 Jan 2011 16:51:25 +0900
-
-elm-webview (1.0.61) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.61
-
- * Toggling between panning and events handling for plugins - Android's way
- * do not suspend if we will not zoom in the smart_zoom
- * do not check file:// in the update_min_zoom_rate function
- * add elm_webview_text_selection_clear API
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Thu, 27 Jan 2011 22:59:27 +0900
-
-elm-webview (1.0.60) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.60
-
- * Pc site pre-rendering implementation
- * Adjust to new ctxpopup API
- * check file:// to not regard widget as a mobile site
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Wed, 26 Jan 2011 23:51:17 +0900
-
-elm-webview (1.0.59) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.59
-
- * Prevent mouse down during scroll
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Mon, 24 Jan 2011 12:08:49 +0900
-
-elm-webview (1.0.58) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.58
-
- * re-build because webkit-engine's sd structure is changed.
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Wed, 19 Jan 2011 23:19:17 +0900
-
-elm-webview (1.0.57) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.57
-
- * correct the TC build scripts
- * change ewk_page_check to ewk_frame_hit_test
- * correct the TC build scripts
- * fix the test cases
- * Unlock pan events send to plugin
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Tue, 18 Jan 2011 20:04:55 +0900
-
-elm-webview (1.0.56) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.56
-
- * remove Google search from Not Found Page
- * remove calling ewk_dnet_open()
- * enabling TBS2.0
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Mon, 17 Jan 2011 13:59:23 +0900
-
-elm-webview (1.0.55) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.55
-
- * send "pan,started/finished", "zoom,started/finished" event to the elm-webview widget
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Fri, 14 Jan 2011 09:36:30 +0900
-
-elm-webview (1.0.54) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.54
-
- * [modal_launcher]fix when long prompt
- * add libslp-utilx-dev dependency
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Thu, 13 Jan 2011 14:22:12 +0900
-
-elm-webview (1.0.53) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.53
-
- * Mobile pre-rendering algorithm optimization
- Fixing error messages in tbs2.0 for mobile pre-rendering
- * reset panning_y_edge variable when panning hold is set
- * [modal_launcher]support back key
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Thu, 13 Jan 2011 13:58:49 +0900
-
-elm-webview (1.0.52) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.52
-
- * remove NEED_TO_REMOVE macro already disabled two days ago
- * remove unused function(unzoomed_position)
- * remove MAX_FLICK_DISTANCE,
- increate MOVE_HISTORY_SIZE (from 5 to 10),
- and calculate flick_index using time for slow panning sites (ex, CSS FIXED)
- * Added invoking reduce/revert FPS on plugins for panning
- * modify flick index calculation algorithm
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Mon, 10 Jan 2011 15:53:32 +0900
-
-elm-webview (1.0.51) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.51
-
- * set panning_y_edge variable to EINA_FALSE when panning is started
- * send 'one,flick,end' if we will not run flick animator
- and modify wrong event in _smart_stop_animator_flick
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Tue, 04 Jan 2011 22:45:41 +0900
-
-elm-webview (1.0.50) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.50
-
- * split flick and move callbak signal
- * feed mouse move events while user doesn't click
- * add saved size checking code and reset saved site
- to prevent to perform HIDE event multiple times
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Mon, 03 Jan 2011 21:27:24 +0900
-
-elm-webview (1.0.49) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.49
-
- * fix crash of ug
- * button layout fix of cert dialog
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Mon, 27 Dec 2010 17:49:55 +0900
-
-elm-webview (1.0.48) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.48
-
- * prevent doublely create two_move animation
- * clean sample code(remove applog, ...)
- * fix zooming bug of google map
- * Fixed pre-rendering issue while orientation changed
- * remove console message becaue we will not support
- * remove ECORE_X_EVENT_WINDOW_PROPERTY handler
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Thu, 23 Dec 2010 20:39:36 +0900
-
-elm-webview (1.0.47) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.47
-
- * move Ewk_Context_Menu_Data Structure into group of...
- * [els_touch]refactoring touch events - forth patch
- * fix wrong patched
- * initialize animator when initializing webview and remov...
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Mon, 20 Dec 2010 17:30:46 +0900
-
-elm-webview (1.0.46) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.46
-
- * remove (disabled)NEED_TO_REMOVE guard for focus ring...
- * doxygen update
- * [els_touch]refactoring - second patch
- * [modal_launcher]implement prompt
- * [els_touch]refactoring - third patch
- * prevent crash
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Mon, 20 Dec 2010 11:51:05 +0900
-
-elm-webview (1.0.45) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.45
-
- * els_webview.c - remove unnecessary code
- * Changes in text selection in editable fields according...
- * change certification string
- * remove ununsed code
- * Send pan and zoom to plugin, webkit will choose which...
- * Adjustements for API rename in TBS2
- * add touch event for panning
- * [els_touch]refactoring - fist patch
- * remove native mouse callbacks because engine removed...
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Wed, 15 Dec 2010 10:18:29 +0900
-
-elm-webview (1.0.44) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.44
-
- * No auto flush in CTBS
- * enable cert dialog
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Thu, 09 Dec 2010 09:57:44 +0900
-
-elm-webview (1.0.43) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.43
-
- * disable NEED_TO_REMOVE to verify before deletion
- * add function comment for els_weview
- * remove webview,created callback
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Wed, 08 Dec 2010 17:23:55 +0900
-
-elm-webview (1.0.42) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.42
-
- * add dependency of elm-webview for elm-webview-dev
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Wed, 08 Dec 2010 09:19:13 +0900
-
-elm-webview (1.0.41) unstable; urgency=low
-
- * Git: 165.213.180.234:slp/pkgs/e/elm-webview
- * Tag: elm-webview_1.0.41
-
- * modify panning_hold to vertical_panning_hold
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Tue, 07 Dec 2010 20:17:07 +0900
-
-elm-webview (1.0.40) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag: elm-webview_1.0.40
-
- * remove *.a
- * code style refactoring and add comment.
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Tue, 07 Dec 2010 16:06:14 +0900
-
-elm-webview (1.0.39) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag: elm-webview_1.0.39
-
- * add ecore_event_handler_del code for ECORE_X_EVENT_WINDOW_PROPERTY callback
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Fri, 03 Dec 2010 17:45:03 +0900
-
-elm-webview (1.0.38) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag: elm-webview_1.0.38
-
- * [modal_launcher]add comment and refactoring
- * delay the one,press and modify two,press
- * [modal_launcher]remove tab and unused macro
- * add '://mobile.' to mobile checking string for mobile.corriere.it
- * add boilerplate for els_touch
- * add define's comments and remove unused function
- * refactoring (coding style fix)
- * modify viewport get function for upgraded webkit-engine
- * wrap the event_feed_to_flash code with EVENT_FEED_TO_FLASH macro which is not defined
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Fri, 03 Dec 2010 16:55:36 +0900
-
-elm-webview (1.0.37) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag: elm-webview_1.0.37
-
- * remove unused variable
- * add elm_webview_panning_hold_set API and add edge,top and edge,bottom event
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Thu, 02 Dec 2010 22:21:40 +0900
-
-elm-webview (1.0.36) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag: elm-webview_1.0.36
-
- * add elm_webview_enable_default_touch_set API
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Thu, 02 Dec 2010 19:16:06 +0900
-
-elm-webview (1.0.35) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag: elm-webview_1.0.35
-
- * move els_touch from elementary to here
- * add the webkit deleting code to the elm_webview
- * Fixed paste bug
- * remove input panel callback when deleting webview
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Thu, 02 Dec 2010 11:47:43 +0900
-
-elm-webview (1.0.34) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag: elm-webview_1.0.34
-
- * Context menu webkit item selection moved to webview
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Tue, 30 Nov 2010 10:55:42 +0900
-
-elm-webview (1.0.33) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag: elm-webview_1.0.33
-
- * add some doxygen comments
- * text selection for editable fields bugfixing
- * Text selection magnifier - magnifying with 1.5 zoom level added
- * remove unnecessary code and some error handling
- * resize webview when ise is shown/hidden.
- * set ECORE_X_EVENT_WINDOW_PROPERTY callback to recognize rotated IME size
- * add elementary to the Requires of pc file
- * Text selection magnifier modification
- * add some codes for NEW_CONTEXT_MENUS
- * modify for LIMO contribution
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Mon, 29 Nov 2010 13:59:10 +0900
-
-elm-webview (1.0.32) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag: elm-webview_1.0.32
-
- * fixing mistakes i did
- * [modal_launcher]implement prompt and cert
- * [modal_launcher]remove unnecessary code
- * [modal_launcher]fix duplicated msg when opening file
- * [modal_launcher]implement file(finish selecting one file)
- * do not do smart zoom when zoom to set and current zoom is same
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Tue, 23 Nov 2010 15:13:56 +0900
-
-elm-webview (1.0.31) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag: elm-webview_1.0.31
-
- * Feed events to flash when after mousedown on it
- * [els-webview.c] text selection for editable fields..
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Sat, 20 Nov 2010 12:19:11 +0900
-
-elm-webview (1.0.30) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag: elm-webview_1.0.30
-
- * New Context menu design
- * [els-webview.c] removed TEXT_SELECTION_MAGNIFIER_ON
- * [modal]make file can return
- * els-webview TEXT_SELECTION_CARET_BLOCK set 1
- * [modal]add internal header
- * [els-webview] text selection for editable fields bugfix
- * add debug package
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Thu, 18 Nov 2010 14:04:11 +0900
-
-elm-webview (1.0.29) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag: elm-webview_1.0.29
-
- * [els-webview.c] Text selection
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Tue, 16 Nov 2010 21:30:44 +0900
-
-elm-webview (1.0.28) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag: elm-webview_1.0.28
-
- * update Makefile of TC
- * update example for doxygen
- * remove PROTOTYPED macro (to keep enabled)
- * [modal_utility]implement file dialog
- * add missing layout size saving code
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Mon, 15 Nov 2010 16:00:10 +0900
-
-elm-webview (1.0.27) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag: elm-webview_1.0.27
-
- * [modal_utility]clean code
- * update doxygen & change Mime_Cb to Scheme_Cb
- * [els_webview.c] Fixed crash caused by using mouse_down_...
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Thu, 11 Nov 2010 10:55:02 +0900
-
-elm-webview (1.0.26) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag: elm-webview_1.0.26
-
- * enabling search option
- * delete ctxpopup when dimmed rect clicked
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Tue, 09 Nov 2010 12:14:30 +0900
-
-elm-webview (1.0.25) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag elm-webview_1.0.25
-
- * Using ewk_view_rescale_images_to_width after resize...
- * [els-webview] Text selection bugfixing
- * update doxygen
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Mon, 08 Nov 2010 11:45:11 +0900
-
-elm-webview (1.0.24) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag elm-webview_1.0.24
-
- * remove discpicker and we have to integrate dropdown ui-gadget
- * remove unnecessary check_point_for_keyboard and duplicated hit_test
- * add new api for modal
- * feed event to flash if the flash contents is clicked
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Thu, 04 Nov 2010 15:41:43 +0900
-
-elm-webview (1.0.23) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag elm-webview_1.0.22
-
- * If is_layout_width_set_to_container use original width...
- * [els-webview] Text selection magnifier improvement
- * call _image_clone_get only if minimap.eo exists
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Thu, 04 Nov 2010 10:48:41 +0900
-
-elm-webview (1.0.22) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag elm-webview_1.0.22
-
- * add elm_webview_auto_suspend_set() API
- * fix the wrong parameter of auto_suspend
- * do not use ewk_view_user_scalable_set in the webview...
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Wed, 03 Nov 2010 17:49:57 +0900
-
-elm-webview (1.0.21) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag elm-webview_1.0.21
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Wed, 03 Nov 2010 10:29:57 +0900
-
-elm-webview (1.0.20) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag elm-webview_1.0.20
-
- * update doxygen image.
- * [els-webview] update text selection feature to meet.
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Wed, 03 Nov 2010 10:22:14 +0900
-
-elm-webview (1.0.19) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag elm-webview_1.0.19
-
- * update doxygen
- * update text selection feature to meet new guideline
- * Clipboard images support
- * update doxygen of scheme_callback_set
- * move zoom initialzing code from load,started to viewport,changed
- * change the zoom functions to support the zoom_start duirng zooming
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Fri, 29 Oct 2010 19:49:15 +0900
-
-elm-webview (1.0.18) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag elm-webview_1.0.18
-
- * add enable_default_context_menu_set/get
- * add the job deleting code
- * add the idler deleting code
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Wed, 27 Oct 2010 11:58:10 +0900
-
-elm-webview (1.0.17) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag elm-webview_1.0.17
-
- * block context popup for flash when long pressed
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Tue, 26 Oct 2010 20:30:19 +0900
-
-elm-webview (1.0.16) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag elm-webview_1.0.14
-
- * remove unused code.
- * update geolocation related function call
- * [els-webview] text selection improvement
- * update boilerplate
- * fix the mobile daum zoom bug
- * fix the docs.google.com's input field zoom bug
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Mon, 25 Oct 2010 11:02:15 +0900
-
-elm-webview (1.0.15) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag elm-webview_1.0.14
-
- * add boilerplate
- * Paste feature
- * [els-webview] fixing bug with text selection on mobile pages
- * View Port has been added for EMBED HTML file
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Fri, 22 Oct 2010 14:49:18 +0900
-
-elm-webview (1.0.14) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag elm-webview_1.0.14
-
- * Text selection handle improvement and bugfixing
- * add new API - elm_webview_input_field_zoom_set
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Thu, 21 Oct 2010 11:14:56 +0900
-
-elm-webview (1.0.13) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag elm-webview_1.0.13
-
- * modify geolocation permission popup from Modal to Modaless
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Wed, 20 Oct 2010 20:20:16 +0900
-
-elm-webview (1.0.12) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag elm-webview_1.0.12
-
- * add ewebkit and cairo requires in the pc file
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Wed, 20 Oct 2010 16:38:16 +0900
-
-elm-webview (1.0.11) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag elm-webview_1.0.11
-
- * modify elm_smart_webview_add to get the Evas_Object instead of Evas
- * delay ctxpopup's move and show,
- it is temporary code to fix the ugly popup problem
- * add els_webview.h into c file / update PG.h
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Wed, 20 Oct 2010 14:18:05 +0900
-
-elm-webview (1.0.10) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag elm-webview_1.0.10
-
- * remove ELM_SET_WIDTYPE because it cause crash in the email and seven-email's ui-gadget
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Wed, 20 Oct 2010 10:35:38 +0900
-
-elm-webview (1.0.9) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag elm-webview_1.0.8
-
- * fix build break
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Wed, 20 Oct 2010 09:40:48 +0900
-
-elm-webview (1.0.8) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag elm-webview_1.0.8
-
- * prototype alert
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Wed, 20 Oct 2010 09:32:16 +0900
-
-elm-webview (1.0.7) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag elm-webview_1.0.7
-
- * update doxygen related document
- * prototype confirm
- * support new window request from webkit engine
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Tue, 19 Oct 2010 20:22:47 +0900
-
-elm-webview (1.0.6) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag elm-webview_1.0.6
-
- * code clean elm_webview.c
-
- -- Eunmi Lee <eunmi15.lee@samsung.com> Tue, 19 Oct 2010 09:13:42 +0900
-
-elm-webview (1.0.5) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag elm-webview_1.0.5
-
- * Remove dlopen
- * Rearrange doxygen
- * second text selection handle
- * naver.com bugfix
- * modal prototype
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Mon, 18 Oct 2010 10:00:28 +0900
-
-elm-webview (1.0.4) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag elm-webview_1.0.4
-
- * text selection handle improvement
- * Twitter insert text feature implementation
- * Paste popup fix
- * add TC
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Wed, 13 Oct 2010 16:54:37 +0900
-
-elm-webview (1.0.2) unstable; urgency=low
-
- * Git: 165.213.180.234:/git/slp/pkgs/elm-webview
- * Tag elm-webview_1.0.3
-
- * Add unapplied changes from elementary.
- * Add pre-render after loaded (related to H0100108699)
-
- -- Ryuan Choi <ryuan.choi@samsung.com> Mon, 11 Oct 2010 17:46:53 +0900
-
elm-webview (1.0.1) unstable; urgency=low
- * Initial release elm-webview
- * Git : 165.213.180.234:/git/slp/pkgs/elm-webview
+ * Git : pkgs/e/elm-webview
* Tag : elm-webview_1.0.1
- -- Gyuyoung Kim <gyuyong.kim@samsung.com> Fri, 08 Oct 2010 14:07:42 +0900
+ * tizen final release
+
+ -- Changhyup Jwa <ch.jwa@samsung.com> Sat, 17 Mar 2012 13:46:25 +0900
elm-webview (1.0.0) unstable; urgency=low
- * split from elementary
+ * Git : pkgs/e/elm-webview
+ * Tag : elm-webview_1.0.0
- -- Mike McCormack <mj.mccormack@samsung.com> Mon, 20 Sep 2010 17:56:41 +0900
+ * tizen beta release
+ -- Changhyup Jwa <ch.jwa@samsung.com> Mon, 27 Feb 2012 21:20:41 +0900
Priority: optional
Maintainer: Kangil Han <kangil.han@samsung.com>, Eunmi Lee <eunmi15.lee@samsung.com>, Ryuan Choi <ryuan.choi@samsung.com>, Sangseok Lim <sangseok.lim@samsung.com>, Jeongah Park <jeongah.park@samsung.com>, Jinwoo Song <jinwoo7.song@samsung.com>, Changhyup Jwa <ch.jwa@samsung.com>, Junghwan Kang <junghwan.kang@samsung.com>
Uploaders: Gyuyoung Kim <gyuyoung.kim@samsung.com>
-Build-Depends: debhelper (>= 6), cdbs, libelm-dev, libappcore-efl-dev, libwebkit-engine-dev, libui-gadget-dev, libbundle-dev, libslp-utilx-dev, dlog-dev, libgnutls-dev, libslp-utilx-dev
+Build-Depends: debhelper (>= 6), cdbs, libelm-dev, libappcore-efl-dev, libwebkit-engine-dev, libui-gadget-dev, libbundle-dev, libslp-utilx-dev, dlog-dev, libgnutls-dev, libslp-utilx-dev, libedje-dev
Standards-Version: 3.8.1
Homepage: N/A
Package: libelm-webview-dev
Section: libdevel
Architecture: any
-Depends: libelm-webview (= ${Source-Version}), libelm-dev, libappcore-efl-dev, libwebkit-engine-dev, libui-gadget-dev, libbundle-dev, libslp-utilx-dev, dlog-dev, libgnutls-dev
+Depends: libelm-webview (= ${Source-Version}), libelm-dev, libappcore-efl-dev, libwebkit-engine-dev, libui-gadget-dev, libbundle-dev, libslp-utilx-dev, dlog-dev, libgnutls-dev, libedje-dev
Description: Elementary webkit widget development headers
Package: libelm-webview
/usr/lib/*.so.*
/usr/lib/*.so
/usr/bin/*
+/usr/share/edje/*edj
}
EAPI Evas_Object *
-elm_webview_add(Evas_Object *parent, Eina_Bool tiled)
+elm_webview_add(Evas_Object *parent, ... )
{
Evas_Object *obj;
Evas *e;
elm_widget_data_set(obj, wd);
elm_widget_del_hook_set(obj, _del_hook);
- wd->webkit = _elm_smart_webview_add(parent, tiled);
+ wd->webkit = _elm_smart_webview_add(parent, EINA_TRUE);
#ifdef BOUNCING_SUPPORT
wd->container = elm_smart_webview_container_add(e);
_elm_smart_webview_container_child_set(wd->container, wd->webkit);
return wd->webkit;
}
+EAPI Evas_Object *
+elm_webview_webkit_view_get(Evas_Object *obj)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return NULL;
+ return wd->webkit;
+}
+
EAPI void
elm_webview_layout_width_set_to_container(Evas_Object *obj)
{
_elm_smart_webview_uri_set(wd->webkit, uri);
}
+EAPI const char *
+elm_webview_uri_get(const Evas_Object *obj)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return NULL;
+ return _elm_smart_webview_uri_get(wd->webkit);
+}
+
EAPI void
elm_webview_scheme_callback_set(Evas_Object *obj, const char *scheme, Elm_WebView_Scheme_Cb func)
{
_elm_smart_webview_input_field_zoom_set(wd->webkit, zoom);
}
+EAPI Eina_Bool
+elm_webview_input_field_zoom_get(Evas_Object *obj)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
+ return _elm_smart_webview_input_field_zoom_get(wd->webkit);
+}
+
EAPI void
elm_webview_auto_suspend_set(Evas_Object *obj, Eina_Bool auto_suspend)
{
_elm_smart_webview_horizontal_panning_hold_set(wd->webkit, hold);
}
+EAPI Eina_Bool
+elm_webview_horizontal_panning_hold_get(Evas_Object *obj)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
+ return _elm_smart_webview_horizontal_panning_hold_get(wd->webkit);
+}
+
EAPI void
elm_webview_vertical_panning_hold_set(Evas_Object *obj, Eina_Bool hold)
{
if (!wd) return;
_elm_webview_show_magnifier_set(wd->webkit, enable);
}
+
+EAPI Eina_Bool
+elm_webview_back(Evas_Object *obj)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
+ return _elm_webview_back(wd->webkit);
+}
+
+EAPI Eina_Bool
+elm_webview_back_possible(Evas_Object *obj)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
+ return _elm_webview_back_possible(wd->webkit);
+}
+
+EAPI Eina_Bool
+elm_webview_forward(Evas_Object *obj)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
+ return _elm_webview_forward(wd->webkit);
+}
+
+EAPI Eina_Bool
+elm_webview_forward_possible(Evas_Object *obj)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
+ return _elm_webview_forward_possible(wd->webkit);
+}
+
+EAPI Eina_Bool
+elm_webview_navigate(Evas_Object *obj, int steps)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
+ return _elm_webview_navigate(wd->webkit, steps);
+}
+
+EAPI Eina_Bool
+elm_webview_navigate_possible(Evas_Object *obj, int steps)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
+ return _elm_webview_navigate_possible(wd->webkit, steps);
+}
+
+EAPI Eina_Bool
+elm_webview_contents_set(Evas_Object *obj, const char *contents, size_t contents_size, const char *mime_type, const char *encoding, const char *base_uri)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
+ return _elm_webview_contents_set(wd->webkit, contents, contents_size, mime_type, encoding, base_uri);
+}
+
+EAPI Eina_Bool
+elm_webview_reload(Evas_Object *obj)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
+ return _elm_webview_reload(wd->webkit);
+}
+
+EAPI Eina_Bool
+elm_webview_stop(Evas_Object *obj)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
+ return _elm_webview_stop(wd->webkit);
+}
+
+EAPI Eina_Bool
+elm_webview_zoom_set(Evas_Object *obj, float zoom)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
+ return _elm_webview_zoom_set(wd->webkit,zoom);
+}
+
+EAPI float
+elm_webview_zoom_get(Evas_Object *obj)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return -1.0;
+ return _elm_webview_zoom_get(wd->webkit);
+}
+
+EAPI Eina_Bool
+elm_webview_zoom_in_possible(Evas_Object *obj)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
+ return _elm_webview_zoom_in_possible(wd->webkit);
+}
+
+EAPI Eina_Bool
+elm_webview_zoom_out_possible(Evas_Object *obj)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
+ return _elm_webview_zoom_out_possible(wd->webkit);
+}
+
+EAPI Eina_Bool
+elm_webview_scroll_by(Evas_Object *obj, int dx, int dy)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
+ return _elm_webview_scroll_by(wd->webkit, dx, dy);
+}
+
+EAPI Eina_Bool
+elm_webview_scroll_pos_set(Evas_Object *obj, int x, int y)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
+ return _elm_webview_scroll_pos_set(wd->webkit, x, y);
+}
+
+Eina_Bool
+elm_webview_scroll_pos_get(Evas_Object *obj, int *x, int *y)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
+ return _elm_webview_scroll_pos_get(wd->webkit, x, y);
+}
+
+EAPI const char *
+elm_webview_title_get(const Evas_Object *obj)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return NULL;
+ return _elm_webview_title_get(wd->webkit);
+}
+
+EAPI Eina_Bool
+elm_webview_text_search(const Evas_Object *obj, const char* string, Eina_Bool case_sensitive, Eina_Bool forward, Eina_Bool wrap)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
+ return _elm_webview_text_search(wd->webkit, string, case_sensitive, forward, wrap);
+}
+
+EAPI unsigned int
+elm_webview_text_matches_mark(Evas_Object *obj, const char *string, Eina_Bool case_sensitive, Eina_Bool highlight, unsigned int limit)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return 0;
+ return _elm_webview_text_matches_mark(obj, string, case_sensitive, highlight, limit);
+}
+
+EAPI Eina_Bool
+elm_webview_text_matches_unmark_all(Evas_Object *obj)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
+ return _elm_webview_text_matches_unmark_all(obj);
+}
+
+EAPI Eina_Bool
+elm_webview_text_matches_highlight_set(Evas_Object *obj, Eina_Bool highlight)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
+ return _elm_webview_text_matches_highlight_set(obj, highlight);
+}
+
+EAPI Eina_Bool
+elm_webview_text_matches_highlight_get(Evas_Object *obj)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
+ return _elm_webview_text_matches_highlight_get(obj);
+}
+
+EAPI void
+elm_webview_pause(Evas_Object *obj)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ _elm_webview_pause(wd->webkit);
+}
+
+EAPI void
+elm_webview_resume(Evas_Object *obj)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ _elm_webview_resume(wd->webkit);
+}
+
#include "log.h"
#include "modal_util.h"
#include <Ecore_X.h>
+#include <appcore-common.h>
#include <cairo.h>
//#define DEBUG_FRAMERATE
+//#define MOTION_UI
+#ifdef MOTION_UI
+#include "sensor.h"
+#include <vconf.h>
+#endif
static const char SMART_NAME[] = "els_webview";
#define API_ENTRY Smart_Data *sd; sd = evas_object_smart_data_get(obj); if (EINA_UNLIKELY((!sd) || strncmp(evas_object_type_get(obj), SMART_NAME, strlen(SMART_NAME))))
#define INTERNAL_ENTRY Smart_Data *sd; sd = evas_object_smart_data_get(obj); if (!sd) return;
unsigned char plugin_mode_and_over_plugin : 1; // "plugin mode" is on and mouse down was over current plugin
unsigned char was_long_press : 1; // long press event came
unsigned char last_event_was_handled_by_plugin : 1; // last mouse event was handled by plugin
- unsigned char on_flick : 1;
struct {
char **options;
struct {
Evas_Point basis; // basis point of zoom
int pre_distance; // distance between two finger in previous
+#ifdef MOTION_UI
+ int pre_motion_distance; // new distance which applied sensor values
+#endif
int init_finger_distance;
int zooming_level;
float zooming_rate;
Eina_Bool use_input_field_zoom;
Eina_Bool auto_suspend;
+ Eina_Bool paused;
+
Eina_Rectangle focused_rect;
Eina_Rectangle caret;
bool is_ise;
unsigned int current_imh;
+#ifdef MOTION_UI
+ Eina_Bool use_tilt_zoom;
+ Eina_Bool on_tilt_zooming;
+ int motion_handle;
+ int motion_center_x;
+ int motion_center_y;
+ int motion_distance;
+ int sensor_x;
+ int sensor_y;
+#endif
Eina_Bool enable_default_touch;
Eina_Bool horizontal_panning_hold;
Eina_Bool panning_x_edge;
// if popup is already opened when _smart_load_started is called,
// then clear popup before load new page
- Evas_Object* geolocation_popup;
+ Evas_Object *geolocation_popup;
// touch mode for EMBERWIND
int touch_mode;
static Eina_Bool _smart_mouse_down(Ewk_View_Smart_Data *esd, const Evas_Event_Mouse_Down *ev);
static Eina_Bool _smart_mouse_up(Ewk_View_Smart_Data *esd, const Evas_Event_Mouse_Up *ev);
static Eina_Bool _smart_mouse_move(Ewk_View_Smart_Data *esd, const Evas_Event_Mouse_Move *ev);
+static void _smart_add_console_message(Ewk_View_Smart_Data *esd, const char* message, unsigned int lineNumber, const char* sourceID);
static void _smart_run_javascript_alert(Ewk_View_Smart_Data *esd, Evas_Object *frame, const char *message);
static Eina_Bool _smart_run_javascript_confirm(Ewk_View_Smart_Data *esd, Evas_Object *frame, const char *message);
static Eina_Bool _smart_run_javascript_prompt(Ewk_View_Smart_Data *esd, Evas_Object *frame, const char *message, const char *defaultValue, char **value);
static void _adjust_to_contents_boundary(Evas_Object *webview, Evas_Coord *to_x, Evas_Coord *to_y,
Evas_Coord from_x, Evas_Coord from_y, float new_zoom_rate);
static Eina_Bool _smart_zoom_animator(void *data);
+static void _contents_scrolled(Evas_Object *webview);
static void _zoom_to_rect(Smart_Data *sd, Eina_Rectangle *rect, Eina_Rectangle *caret);
static void _coords_evas_to_ewk(Evas_Object *webview, int x, int y, int* ux, int* uy);
static void _coords_ewk_to_evas(Evas_Object *webview, int x, int y, int* ux, int* uy);
-static void _update_min_zoom_rate(Evas_Object *obj);
static void _geolocation_permission_callback(void *geolocation_obj, const char* url);
+static void _geolocation_response_ok_callback(void *data, Evas_Object *obj, void *event_info);
+static void _geolocation_response_cancel_callback(void *data, Evas_Object *obj, void *event_info);
static Eina_List *_touch_point_list_get(unsigned int num_of_points, const Touch_Point *p_points);
static Eina_Bool _touch_down(Evas_Object *o, const Evas_Event_Mouse_Down *mouse_down);
static void _smart_cb_make_select_visible(void *data, Evas_Object *webview, void *arg);
static void _smart_cb_make_rect_visible(void *data, Evas_Object *webview, void *arg);
static Eina_Bool _focus_ring_exceptional_url_get(Evas_Object *webview);
+#ifdef MOTION_UI
+static void _smart_cb_tilt_zoom(unsigned int event_type, void *event_data , void *data);
+static void _smart_cb_tilt_zoom_start(void *data, Evas_Object *webview, void *ev);
+static void _smart_cb_tilt_zoom_end(void *data, Evas_Object *webview);
+#endif
+
+/* webkit context menus callbacks */
+static void _smart_cb_contextmenu_new(void *data, Evas_Object *webview, void *arg);
+static void _smart_cb_contextmenu_free(void *data, Evas_Object *webview, void *arg);
+static void _smart_cb_contextmenu_item_appended(void *data, Evas_Object *webview, void *arg);
+static void _smart_cb_contextmenu_customize(void *data, Evas_Object *webview, void *arg);
+static void _smart_cb_contextmenu_show(void *data, Evas_Object *webview, void *arg);
+static void _smart_cb_contextmenu_save_as(void *data, Evas_Object *webview, void *arg);
+static void _smart_cb_contextmenu_sendvia_email(void *data, Evas_Object *webview, void *arg);
+static void _smart_cb_contextmenu_sendvia_message(void *data, Evas_Object *webview, void *arg);
/* local subsystem globals */
static Evas_Smart *_smart = NULL;
static Ewk_View_Smart_Class _parent_sc = EWK_VIEW_SMART_CLASS_INIT_NULL;
-static Evas_Object *obj = NULL; /* FIXME: Is it a right approach? */
+static Evas_Object *view_obj = NULL; /* FIXME: Is it a right approach? */
/* externally accessible functions */
_api.mouse_up = _smart_mouse_up ;
_api.mouse_move = _smart_mouse_move;
+ _api.add_console_message = _smart_add_console_message;
_api.run_javascript_alert = _smart_run_javascript_alert;
_api.run_javascript_confirm = _smart_run_javascript_confirm;
_api.run_javascript_prompt = _smart_run_javascript_prompt;
ELM_WEBVIEW_SLOGE("could not create smart object for webview");
return NULL;
}
- obj = webview;
+ view_obj = webview;
Smart_Data *sd = evas_object_smart_data_get(webview);
if (sd)
* @brief Get the ability for the webkit object to fit the contents after loading.
*
* @param[in] obj els-webview
- * @return Eina_True if webview fit the contents after loading. Eina_False if else or on errors.
+ * @return EINA_TRUE if webview fit the contents after loading. Eina_False if else or on errors.
*/
Eina_Bool
_elm_smart_webview_auto_fitting_get(Evas_Object *obj)
}
/**
+ * @fn const char *_elm_smart_webview_uri_get(Evas_Object *obj)
+ * @brief Gets the current uri loaded.
+ *
+ * @param[in] obj els-webview
+ * @return the current uri.
+ */
+const char *
+_elm_smart_webview_uri_get(Evas_Object *obj)
+{
+ API_ENTRY return NULL;
+ return ewk_view_uri_get(obj);
+}
+
+/**
* @fn void _elm_smart_webview_widget_set(Evas_Object *obj, Evas_Object *wid)
* @brief set elm webview into els-webview.
*
}
/**
+ * @fn Eina_Bool _elm_smart_webview_input_field_zoom_get(Evas_Object* obj)
+ * @brief Get the property for the input field zoom effect
+ *
+ * See elm_webview_input_field_zoom_get
+ *
+ * @param [in] obj els-webview
+ * @return Eina_TRUE when the input field zoom effect is enabled, otherwise EINA_FALSE.
+ */
+Eina_Bool
+_elm_smart_webview_input_field_zoom_get(Evas_Object *obj)
+{
+ API_ENTRY return EINA_FALSE;
+ return sd->use_input_field_zoom;
+}
+
+/**
* @fn void _elm_smart_webview_auto_suspend_set(Evas_Object *obj, Eina_Bool auto_suspend)
* @brief turn on/off the auto suspend
*
* @brief Get the ability for the webview object to show default context menu.
*
* @param[in] object els-webview.
- * @return Eina_True if default context menu was enabled, EINA_FALSE otherwise.
+ * @return EINA_TRUE if default context menu was enabled, EINA_FALSE otherwise.
*/
Eina_Bool
_elm_smart_webview_enable_default_context_menu_get(Evas_Object *obj)
}
/**
+ * @fn Eina_Bool _elm_smart_webview_horizontal_panning_hold_get(Evas_Object *obj)
+ * @brief Get hold/unhold horizontal panning status.
+ * horizontal panning will be stopped during hold, and will be done during unhold.
+ *
+ * @param[in] object els-webview.
+ * @return EINA_TRUE if horizontal panning hold set is enabled, EINA_FALSE otherwise
+ */
+Eina_Bool
+_elm_smart_webview_horizontal_panning_hold_get(Evas_Object *obj)
+{
+ API_ENTRY return EINA_FALSE;
+ return sd->horizontal_panning_hold;
+}
+
+/**
* @fn void _elm_smart_webview_vertical_panning_hold_set(Evas_Object *obj, Eina_Bool hold)
* @brief hold/unhold vertical panning.
* vertical panning will be stopped during hold, and will be done during unhold.
* vertical panning will be stopped during hold, and will be done during unhold.
*
* @param[in] object els-webview.
- * @return Eina_True if vertical panning hold set is enabled, EINA_FALSE otherwise
+ * @return EINA_TRUE if vertical panning hold set is enabled, EINA_FALSE otherwise
*/
Eina_Bool
_elm_smart_webview_vertical_panning_hold_get(Evas_Object *obj)
* @brief gets if WebView should fix its position.
*
* @param[in] obj els-webview Evas_Object.
+ * @return EINA_TRUE if WebView should fix its position. EINA_FALSE otherwise.
*/
Eina_Bool
_elm_webview_fixed_position_get(Evas_Object *obj)
_elm_smart_webview_use_tilt_zoom_set(Evas_Object *obj, Eina_Bool enable)
{
API_ENTRY return;
+#ifdef MOTION_UI
+ sd->use_tilt_zoom = enable;
+#endif
}
/**
els_webview_editor_show_magnifier_set(sd->editor, enable);
}
+Eina_Bool
+_elm_webview_back(Evas_Object *obj)
+{
+ API_ENTRY return EINA_FALSE;
+ return ewk_view_back(obj);
+}
+
+Eina_Bool
+_elm_webview_back_possible(Evas_Object *obj)
+{
+ API_ENTRY return EINA_FALSE;
+ return ewk_view_back_possible(obj);
+}
+
+Eina_Bool
+_elm_webview_forward(Evas_Object *obj)
+{
+ API_ENTRY return EINA_FALSE;
+ return ewk_view_forward(obj);
+}
+
+Eina_Bool
+_elm_webview_forward_possible(Evas_Object *obj)
+{
+ API_ENTRY return EINA_FALSE;
+ return ewk_view_forward_possible(obj);
+}
+
+Eina_Bool
+_elm_webview_navigate(Evas_Object *obj, int steps)
+{
+ API_ENTRY return EINA_FALSE;
+ return ewk_view_navigate(obj, steps);
+}
+
+Eina_Bool
+_elm_webview_navigate_possible(Evas_Object *obj, int steps)
+{
+ API_ENTRY return EINA_FALSE;
+ return ewk_view_navigate_possible(obj, steps);
+}
+
+Eina_Bool
+_elm_webview_contents_set(Evas_Object *obj, const char *contents, size_t contents_size, const char *mime_type, const char *encoding, const char *base_uri)
+{
+ API_ENTRY return EINA_FALSE;
+ return ewk_view_contents_set(obj, contents, contents_size, mime_type, encoding, base_uri);
+}
+
+Eina_Bool
+_elm_webview_reload(Evas_Object *obj)
+{
+ API_ENTRY return EINA_FALSE;
+ return ewk_view_reload_full(obj);
+}
+
+Eina_Bool
+_elm_webview_stop(Evas_Object *obj)
+{
+ API_ENTRY return EINA_FALSE;
+ return ewk_view_stop(obj);
+}
+
+Eina_Bool
+_elm_webview_zoom_set(Evas_Object *obj, float zoom)
+{
+ API_ENTRY return EINA_FALSE;
+ return ewk_view_zoom_set(obj, zoom, 0, 0);
+}
+
+float
+_elm_webview_zoom_get(Evas_Object *obj)
+{
+ API_ENTRY return -1.0;
+ return ewk_view_zoom_get(obj);
+}
+
+Eina_Bool
+_elm_webview_zoom_in_possible(Evas_Object *obj)
+{
+ API_ENTRY return EINA_FALSE;
+ return (ewk_view_zoom_range_max_get(obj) > ewk_view_zoom_get(obj));
+}
+
+Eina_Bool
+_elm_webview_zoom_out_possible(Evas_Object *obj)
+{
+ API_ENTRY return EINA_FALSE;
+ return (ewk_view_zoom_range_min_get(obj) < ewk_view_zoom_get(obj));
+}
+
+Eina_Bool
+_elm_webview_scroll_by(Evas_Object *obj, int dx, int dy)
+{
+ API_ENTRY return EINA_FALSE;
+ return ewk_frame_scroll_add(ewk_view_frame_main_get(obj), dx, dy);
+}
+
+Eina_Bool
+_elm_webview_scroll_pos_set(Evas_Object *obj, int x, int y)
+{
+ API_ENTRY return EINA_FALSE;
+ return ewk_frame_scroll_set(ewk_view_frame_main_get(obj), x, y);
+}
+
+Eina_Bool
+_elm_webview_scroll_pos_get(Evas_Object *obj, int *x, int *y)
+{
+ API_ENTRY return EINA_FALSE;
+ return ewk_frame_scroll_pos_get(ewk_view_frame_main_get(obj), x, y);
+}
+
+const char *
+_elm_webview_title_get(Evas_Object *obj)
+{
+ API_ENTRY return NULL;
+ return ewk_view_title_get(obj);
+}
+
+Eina_Bool
+_elm_webview_text_search(Evas_Object *obj, const char* string, Eina_Bool case_sensitive, Eina_Bool forward, Eina_Bool wrap)
+{
+ API_ENTRY return EINA_FALSE;
+ return ewk_view_text_search(obj, string, case_sensitive, forward, wrap);
+}
+
+unsigned int
+_elm_webview_text_matches_mark(Evas_Object *obj, const char *string, Eina_Bool case_sensitive, Eina_Bool highlight, unsigned int limit)
+{
+ API_ENTRY return 0;
+ return ewk_view_text_matches_mark(obj, string, case_sensitive, highlight, limit);
+}
+
+Eina_Bool
+_elm_webview_text_matches_unmark_all(Evas_Object *obj)
+{
+ API_ENTRY return EINA_FALSE;
+ return ewk_view_text_matches_unmark_all(obj);
+}
+
+Eina_Bool
+_elm_webview_text_matches_highlight_set(Evas_Object *obj, Eina_Bool highlight)
+{
+ API_ENTRY return EINA_FALSE;
+ return ewk_view_text_matches_highlight_set(obj, highlight);
+}
+
+Eina_Bool
+_elm_webview_text_matches_highlight_get(Evas_Object *obj)
+{
+ API_ENTRY return EINA_FALSE;
+ return ewk_view_text_matches_highlight_get(obj);
+}
+
+void
+_elm_webview_pause(Evas_Object *obj)
+{
+ API_ENTRY return;
+ if (sd->paused)
+ return;
+
+ sd->paused = EINA_TRUE;
+ _suspend_all(sd);
+}
+
+void
+_elm_webview_resume(Evas_Object *obj)
+{
+ API_ENTRY return;
+ if (!sd->paused)
+ return;
+
+ sd->paused = EINA_FALSE;
+ _resume_all(sd);
+}
+
/**
* @fn Eina_Bool _flush(void *data)
* @brief idler function to flush unused cache.
ELM_WEBVIEW_SLOGD("\n");
INTERNAL_ENTRY;
+ view_obj = obj;
+
if (sd->enable_default_touch)
_elm_smart_touch_start(sd->touch_obj);
_parent_sc.sc.show(obj);
Smart_Data* sd = (Smart_Data *)data;
if (!sd) return;
+ Evas_Object *view = sd->base.self;
+
int object_x, object_y, object_w, object_h;
- evas_object_geometry_get(obj, &object_x, &object_y, &object_w, &object_h);
+ evas_object_geometry_get(view, &object_x, &object_y, &object_w, &object_h);
els_webview_editor_view_geometry_changed(sd->editor, object_x, object_y, object_w, object_h);
- const char *url = ewk_view_uri_get(obj);
+ const char *url = ewk_view_uri_get(view);
if (url && strlen(url) != 0 && sd->flush_idler == NULL)
- sd->flush_idler = ecore_idler_add(_flush, obj);
+ sd->flush_idler = ecore_idler_add(_flush, view);
Ecore_IMF_Context *im_Context = ewk_view_core_imContext_get(sd->base.self);
Eina_Rectangle im_size;
return EINA_TRUE;
}
+static void
+_smart_add_console_message(Ewk_View_Smart_Data* esd, const char* message, unsigned int lineNumber, const char* sourceID)
+{
+ CONSOLE_MESSAGE_SLOGI("%s:%d: %s\n", sourceID, lineNumber, message);
+}
+
/**
* @fn static void _smart_run_javascript_alert(Ewk_View_Smart_Data *esd, Evas_Object *frame, const char *message)
* @brief open alert dialog.
els_webview_editor_selection_mode_change(sd->editor, TEXT_SELECTION_MODE_OFF);
// clear the existing popup
- if (sd->geolocation_popup) {
- evas_object_smart_callback_call(sd->geolocation_popup, "response", (void *)ELM_POPUP_RESPONSE_CANCEL);
- sd->geolocation_popup = 0;
- }
+ if (sd->geolocation_popup)
+ {
+ evas_object_del(sd->geolocation_popup);
+ sd->geolocation_popup = 0;
+ }
}
/**
ewk_view_viewport_attributes_get(webview, &layout_w, &layout_h, &init_zoom, &max_zoom, &min_zoom, &dpr, &scalable);
+ // width is changed by dpr. So, we should adjust dpr value to zoom factors.
+ init_zoom *= dpr;
+ max_zoom *= dpr;
+ min_zoom *= dpr;
+
+ // get webview size
+ int webview_x, webview_y, webview_w, webview_h;
+ evas_object_geometry_get(webview, &webview_x, &webview_y, &webview_w, &webview_h);
+
// if viewport argument is not exist
// then we should set zoom and layout values with contents size
// because ewk_view_viewport_attributes_get() always returns 980 width if is_viewport_argument_exist is false
sd->layout.h = layout_h;
sd->device_pixel_ratio = dpr;
sd->zoom.scalable = scalable;
+
+ // workaround. We should make a policy considering desktop contents has viewport metatag.
+ // if auto fitting option is disabled, try to set 1.0 zoom value
+ if (sd->auto_fitting == EINA_FALSE)
+ {
+ float readable_rate = 1.0f;
+ if (readable_rate < sd->zoom.min_zoom_rate)
+ readable_rate = sd->zoom.min_zoom_rate;
+ if (readable_rate > sd->zoom.max_zoom_rate)
+ readable_rate = sd->zoom.max_zoom_rate;
+ sd->zoom.init_zoom_rate = readable_rate;
+ }
}
else
{
- // get webview size
- int webview_x, webview_y, webview_w, webview_h;
- evas_object_geometry_get(webview, &webview_x, &webview_y, &webview_w, &webview_h);
-
// get contents size
int content_w, content_h;
ewk_frame_contents_size_get(ewk_view_frame_main_get(webview), &content_w, &content_h);
+
ELM_WEBVIEW_SLOGD("Desktop layout - viewportsize[%d, %d], zoom_rate[%f, %f, %f], dpr[%f], scalable[%d]\n"
"webview x, y, w, h [%d, %d, %d, %d], content size [%d, %d]\n",
layout_w, layout_h, init_zoom, max_zoom, min_zoom, dpr, scalable,
// then we shouldn't relayout contents
if (layout_w <= 0 || layout_h <= 0 || content_w <= 0 || content_h <= 0) return;
- Ecore_Evas* ee = 0;
- int window_w, window_h;
-
- ee = ecore_evas_ecore_evas_get(evas_object_evas_get(webview));
- ecore_evas_geometry_get(ee, 0, 0, &window_w, &window_h);
-
int updated_layout_w = content_w;
int updated_content_h = ((float)content_h * updated_layout_w) / content_w;
if ((float)updated_layout_w / content_h > (float)webview_w / webview_h)
sd->zoom.max_zoom_rate = max_zoom;
sd->zoom.min_zoom_rate = (float)webview_w / updated_layout_w;
+ if (webview_w == content_w)
+ {
+ // if contents width is same to webview's width,
+ // set layout width to 980 which is returned by ewk_view_viewport_attributes_get()
+ updated_layout_w = layout_w;
+ updated_content_h = layout_h;
+ sd->zoom.min_zoom_rate = min_zoom;
+ }
+
// auto fitting option dependent initial zoom rate
if (sd->auto_fitting == EINA_TRUE)
sd->zoom.init_zoom_rate = sd->zoom.min_zoom_rate;
sd->update_layout_job = ecore_job_add(_update_layout_job, sd);
}
-/**
- * Rotaion modes
- * @see appcore_set_rotation_cb(), appcore_get_rotation_state()
- */
-enum appcore_rm {
- APPCORE_RM_UNKNOWN, /**< Unknown mode */
- APPCORE_RM_PORTRAIT_NORMAL , /**< Portrait mode */
- APPCORE_RM_PORTRAIT_REVERSE , /**< Portrait upside down mode */
- APPCORE_RM_LANDSCAPE_NORMAL , /**< Left handed landscape mode */
- APPCORE_RM_LANDSCAPE_REVERSE , /**< Right handed landscape mode */
-};
/*
static void
updateIMFOrientation( Ecore_IMF_Context *ctx )
Smart_Data* sd = (Smart_Data *)data;
if (!sd) return;
- if (sd->auto_suspend && (sd->on_zooming == EINA_FALSE) && (sd->on_panning == EINA_FALSE))
+ if (!sd->paused && (sd->on_zooming == EINA_FALSE) && (sd->on_panning == EINA_FALSE))
_resume_all(sd);
if (els_webview_editor_selection_mode_get(sd->editor) & TEXT_SELECTION_ZOOM_START)
els_webview_editor_selection_mode_change(sd->editor, TEXT_SELECTION_ZOOM_END);
+
+ if (els_webview_editor_selection_mode_get(sd->editor) != TEXT_SELECTION_TWO_HANDLES)
+ els_webview_editor_selection_update_position(sd->editor, NULL);
}
/**
sd->is_ise_flash = EINA_FALSE;
sd->input_method_changed_job = NULL;
- sd->auto_suspend = EINA_FALSE;
+ sd->paused = EINA_FALSE;
sd->createwebview_data = NULL;
+#ifdef MOTION_UI
+ sd->use_tilt_zoom = EINA_TRUE;
+ sd->on_tilt_zooming = EINA_FALSE;
+ evas_object_smart_callback_add(obj, "tilt,zoom,start", _smart_cb_tilt_zoom_start, sd);
+ evas_object_smart_callback_add(obj, "tilt,zoom,end", _smart_cb_tilt_zoom_end, sd);
+#endif
evas_object_smart_callback_add(obj, "load,started", _smart_load_started, sd);
evas_object_smart_callback_add(obj, "load,finished", _smart_load_finished, sd);
sd->editor = els_webview_editor_init(obj);
+ // contextmenu cllabacks
+ // CAUTION : they should be added after sd->editor is set
+ evas_object_smart_callback_add(obj, "contextmenu,new", _smart_cb_contextmenu_new, sd->editor);
+ evas_object_smart_callback_add(obj, "contextmenu,item,appended", _smart_cb_contextmenu_item_appended, sd->editor);
+ evas_object_smart_callback_add(obj, "contextmenu,customize", _smart_cb_contextmenu_customize, sd->editor);
+ evas_object_smart_callback_add(obj, "contextmenu,show", _smart_cb_contextmenu_show, sd->editor);
+ evas_object_smart_callback_add(obj, "contextmenu,free", _smart_cb_contextmenu_free, sd->editor);
+ evas_object_smart_callback_add(obj, "contextmenu,save,as", _smart_cb_contextmenu_save_as, sd->editor);
+ evas_object_smart_callback_add(obj, "contextmenu,sendvia,email", _smart_cb_contextmenu_sendvia_email, sd->editor);
+ evas_object_smart_callback_add(obj, "contextmenu,sendvia,message", _smart_cb_contextmenu_sendvia_message, sd->editor);
+
sd->geolocation_popup = 0;
#ifdef DEBUG_FRAMERATE
sd->start_time = 0.0f;
sd->scheme_func_hash = NULL;
}
+ // delete smart callbacks
+#ifdef MOTION_UI
+ evas_object_smart_callback_del(obj, "tilt,zoom,start", _smart_cb_tilt_zoom_start);
+ evas_object_smart_callback_del(obj, "tilt,zoom,end", _smart_cb_tilt_zoom_end);
+#endif
+
+ evas_object_smart_callback_del(obj, "load,started", _smart_load_started);
+ evas_object_smart_callback_del(obj, "load,finished", _smart_load_finished);
+ evas_object_smart_callback_del(obj, "viewport,changed", _smart_viewport_changed);
+ evas_object_smart_callback_del(obj, "inputmethod,changed", _smart_input_method_changed);
+
+ evas_object_smart_callback_del(obj, "zoom,set", _smart_cb_zoom_set);
+
+ evas_object_smart_callback_del(obj, "view,resized", _smart_cb_view_resized);
+ evas_object_smart_callback_del(ewk_view_frame_main_get(obj), "contents,size,changed",
+ _smart_contents_size_changed);
+ evas_object_smart_callback_del(ewk_view_frame_main_get(obj), "load,nonemptylayout,finished",
+ _smart_load_nonemptylayout_finished);
+
+ evas_object_smart_callback_del(obj, "one,press", _smart_cb_mouse_down);
+ evas_object_smart_callback_del(obj, "one,release", _smart_cb_mouse_up);
+ evas_object_smart_callback_del(obj, "one,single,tap", _smart_cb_mouse_tap);
+ evas_object_smart_callback_del(obj, "one,long,press", _smart_cb_mouse_long_press);
+ evas_object_smart_callback_del(obj, "one,move,start", _smart_cb_one_move_start);
+ evas_object_smart_callback_del(obj, "one,move", _smart_cb_one_move);
+ evas_object_smart_callback_del(obj, "one,move,end", _smart_cb_one_move_end);
+ evas_object_smart_callback_del(obj, "two,press", _smart_cb_two_press);
+ evas_object_smart_callback_del(obj, "two,move,start", _smart_cb_two_move_start);
+ evas_object_smart_callback_del(obj, "two,move", _smart_cb_two_move);
+ evas_object_smart_callback_del(obj, "two,move,end", _smart_cb_two_move_end);
+ evas_object_smart_callback_del(obj, "two,release", _smart_cb_two_release);
+ evas_object_smart_callback_del(obj, "one,down,up,down", _smart_cb_one_down_up_down);
+
+ evas_object_smart_callback_del(obj, "pan,start", _smart_cb_pan_start);
+ evas_object_smart_callback_del(obj, "panning", _smart_cb_pan_by);
+ evas_object_smart_callback_del(obj, "pan,end", _smart_cb_pan_end);
+
+ evas_object_smart_callback_del(obj, "make,select,visible", _smart_cb_make_select_visible);
+ evas_object_smart_callback_del(obj, "make,rect,visible", _smart_cb_make_rect_visible);
+
+ // contextmenu cllabacks
+ evas_object_smart_callback_del(obj, "contextmenu,new", _smart_cb_contextmenu_new);
+ evas_object_smart_callback_del(obj, "contextmenu,item,appended", _smart_cb_contextmenu_item_appended);
+ evas_object_smart_callback_del(obj, "contextmenu,customize", _smart_cb_contextmenu_customize);
+ evas_object_smart_callback_del(obj, "contextmenu,show", _smart_cb_contextmenu_show);
+ evas_object_smart_callback_del(obj, "contextmenu,free", _smart_cb_contextmenu_free);
+ evas_object_smart_callback_del(obj, "contextmenu,save,as", _smart_cb_contextmenu_save_as);
+ evas_object_smart_callback_del(obj, "contextmenu,sendvia,email", _smart_cb_contextmenu_sendvia_email);
+ evas_object_smart_callback_del(obj, "contextmenu,sendvia,message", _smart_cb_contextmenu_sendvia_message);
+
// delete jobs
if (sd->update_layout_job) ecore_job_del(sd->update_layout_job);
if (sd->input_method_changed_job) ecore_job_del(sd->input_method_changed_job);
Ecore_IMF_Context *imContext = ewk_view_core_imContext_get(sd->base.self);
ecore_imf_context_input_panel_event_callback_del(imContext, ECORE_IMF_INPUT_PANEL_STATE_EVENT, _smart_cb_ise_event);
- if (sd->geolocation_popup) {
- evas_object_del(sd->geolocation_popup);
- sd->geolocation_popup = 0;
- }
+ if (sd->geolocation_popup)
+ {
+ evas_object_del(sd->geolocation_popup);
+ sd->geolocation_popup = 0;
+ }
_parent_sc.sc.del(obj);
}
if (els_webview_editor_selection_mode_get(sd->editor) & TEXT_SELECTION_INPUT)
els_webview_editor_selection_mode_change(sd->editor, TEXT_SELECTION_MOUSE_DOWN);
+ if (els_webview_editor_selection_mode_get(sd->editor) & TEXT_SELECTION_POPUP)
+ els_webview_editor_selection_mode_change(sd->editor, TEXT_SELECTION_MODE_OFF);
+
ELM_WEBVIEW_SLOGD("mouse_move\n");
sd->mouse_move_copy.cur.canvas.x = point->x;
sd->mouse_move_copy.cur.canvas.y = point->y;
if (sd->events_feed) return;
// don't make pause and resume when panning is done over selected plugin
- if (sd->auto_suspend && !sd->plugin_mode_and_over_plugin)
+ if (!sd->paused && !sd->plugin_mode_and_over_plugin)
_suspend_all(sd);
sd->pan_s = *point;
int new_x, new_y;
ewk_frame_scroll_pos_get(ewk_view_frame_main_get(webview), &new_x, &new_y);
+ // set edge state to stop flick operation
+ if (!sd->horizontal_panning_hold && (old_x == new_x))
+ {
+ if (dx <= 0)
+ _elm_smart_touch_edge_left_set(sd->touch_obj);
+ if (dx >= 0)
+ _elm_smart_touch_edge_right_set(sd->touch_obj);
+ }
+ if (!sd->vertical_panning_hold && (old_y == new_y))
+ {
+ if (dy <= 0)
+ _elm_smart_touch_edge_top_set(sd->touch_obj);
+ if (dy >= 0)
+ _elm_smart_touch_edge_bottom_set(sd->touch_obj);
+ }
+
// send edge event when we reach to the edge
if (!sd->panning_y_edge && (old_y == new_y))
{
ELM_WEBVIEW_SLOGI("<< panning frame rate = [%.1f] fps >>\n", framerate);
#endif
- if (sd->auto_suspend && !sd->plugin_mode_and_over_plugin)
+ if (!sd->paused && !sd->plugin_mode_and_over_plugin)
_resume_all(sd);
- //at the end of panning, onscroll event is generated when it is set to be suppressed during panning
- if (sd->scrolled && ewk_view_setting_enable_onscroll_event_suppression_get(webview))
- ewk_frame_onscroll_event_generate(ewk_view_frame_main_get(webview));
+ _contents_scrolled(webview);
- Evas_Point *point = (Evas_Point *)ev;
sd->on_panning = EINA_FALSE;
#ifdef BOUNCING_SUPPORT
}
}
+
+
+
// zoom
static const float ZOOM_STEP_PER_PIXEL = 0.005f;
}
static void
-_zoom_start(Smart_Data *sd, int centerX, int centerY, int distance)
-{
- ELM_WEBVIEW_SLOGD("\n");
-
- {
- sd->zoom.init_finger_distance = distance;
- sd->zoom.pre_distance = distance;
- sd->zoom.zooming_level = 0;
- if (sd->on_zooming)
- sd->zoom.zoom_rate_at_start = sd->zoom.zooming_rate;
- else
- {
- int view_x, view_y;
- evas_object_geometry_get(sd->base.self, &view_x, &view_y, NULL, NULL);
- sd->zoom.zoom_rate_at_start = ewk_view_zoom_get(sd->base.self);
- sd->zoom.basis.x = centerX - view_x;
- sd->zoom.basis.y = centerY - view_y;
- }
- sd->zoom.zooming_rate = sd->zoom.zoom_rate_at_start;
-
- if (sd->auto_suspend && !sd->plugin_mode_and_over_plugin)
- _suspend_all(sd);
-
- els_webview_editor_selection_mode_change(sd->editor, TEXT_SELECTION_ZOOM_START);
-
-#ifdef DEBUG_FRAMERATE
- sd->start_time = ecore_time_get();
- sd->count = 0;
-#endif
- }
- sd->on_zooming = EINA_TRUE;
-}
-
-static void
-_zoom_move(Smart_Data* sd, int centerX, int centerY, int distance)
-{
- if (sd->on_zooming == EINA_FALSE) return;
-
-#ifdef DEBUG_FRAMERATE
- sd->count++;
-#endif
-
- int zoom_distance = distance - sd->zoom.pre_distance;
- int new_distance = distance;
-
-
- if (zoom_distance != sd->zoom.zooming_level)
- {
- float zoom_ratio;
-
- if (sd->use_zoom_bouncing)
- {
- float min_zoom_rate = sd->zoom.min_zoom_rate * ZOOM_OUT_BOUNCING;
- if (min_zoom_rate <= 0) min_zoom_rate = MIN_ZOOM_RATIO;
- float max_zoom_rate = sd->zoom.max_zoom_rate * ZOOM_IN_BOUNCING;
-
- zoom_ratio = sd->zoom.zoom_rate_at_start * (1.0 + (((float)new_distance - (float)sd->zoom.init_finger_distance) / sd->zoom.init_finger_distance));
-
- if (zoom_ratio < min_zoom_rate)
- zoom_ratio = min_zoom_rate;
- if (zoom_ratio > max_zoom_rate)
- zoom_ratio = max_zoom_rate;
- }
- else
- {
- zoom_ratio = sd->zoom.zooming_rate + zoom_distance * ZOOM_STEP_PER_PIXEL;
- if (zoom_ratio < sd->zoom.min_zoom_rate)
- zoom_ratio = sd->zoom.min_zoom_rate;
- if (zoom_ratio > sd->zoom.max_zoom_rate)
- zoom_ratio = sd->zoom.max_zoom_rate;
- }
- sd->zoom.zooming_level = zoom_distance;
- sd->zoom.zooming_rate = zoom_ratio;
- sd->zoom.pre_distance = distance;
- ewk_view_zoom_weak_set(sd->base.self, zoom_ratio, sd->zoom.basis.x, sd->zoom.basis.y);
- ELM_WEBVIEW_SLOGD("<< zoom weak set [%f] >>\n", zoom_ratio);
- }
-}
-
-static void
-_zoom_stop(Smart_Data *sd, Evas_Object *webview)
-{
- if (sd->on_zooming == EINA_FALSE) return;
- Eina_Bool ret = EINA_FALSE;
- sd->on_zooming = EINA_FALSE;
- ELM_WEBVIEW_SLOGD("(%d)\n", sd->zoom.zooming_level);
-
-#ifdef DEBUG_FRAMERATE
- double framerate = sd->count / (ecore_time_get() - sd->start_time);
- if (framerate < 60.0f)
- ELM_WEBVIEW_SLOGI("<< zooming frame rate = [%.1f] fps >>\n", framerate);
-#endif
-
- sd->zoom.zoom_rate_to_set = sd->zoom.zooming_rate;
- if (sd->zoom.zoom_rate_to_set < sd->zoom.min_zoom_rate)
- sd->zoom.zoom_rate_to_set = sd->zoom.min_zoom_rate;
- if (sd->zoom.zoom_rate_to_set > sd->zoom.max_zoom_rate)
- sd->zoom.zoom_rate_to_set = sd->zoom.max_zoom_rate;
- if (sd->use_zoom_bouncing
- && (sd->zoom.zoom_rate_to_set != sd->zoom.zooming_rate))
- {
- sd->zoom.zoom_rate_at_start = sd->zoom.zooming_rate;
- smart_zoom_index = N_COSINE - 1;
- ecore_animator_frametime_set(1.0 / ZOOM_FRAMERATE);
- sd->smart_zoom_animator = ecore_animator_add(_smart_zoom_animator, sd);
- }
- else
- {
- if (sd->zoom.zoom_rate_to_set == ewk_view_zoom_get(webview))
- {
- ewk_view_zoom_weak_set(sd->base.self, sd->zoom.zoom_rate_to_set, sd->zoom.basis.x, sd->zoom.basis.y);
- }
- else
- {
- ret = ewk_view_zoom_set(sd->base.self, sd->zoom.zoom_rate_to_set, sd->zoom.basis.x, sd->zoom.basis.y);
- }
- if (ret == EINA_FALSE && sd->auto_suspend && !sd->plugin_mode_and_over_plugin) _resume_all(sd);
- ELM_WEBVIEW_SLOGD("<< zoom set [%f] >>\n", sd->zoom.zoom_rate_to_set);
- evas_object_smart_callback_call(sd->widget, "zoom,finished", NULL);
- }
-}
-
-static void
_adjust_to_contents_boundary(Evas_Object *obj, Evas_Coord *to_x, Evas_Coord *to_y,
Evas_Coord from_x, Evas_Coord from_y, float new_zoom_rate)
{
&& (sd->zoom.zoom_rate_at_start != sd->zoom.zoom_rate_to_set))
{
Eina_Bool ret = ewk_view_zoom_set(sd->base.self, sd->zoom.zoom_rate_to_set, sd->zoom.basis.x, sd->zoom.basis.y);
- if (ret == EINA_FALSE && sd->auto_suspend == EINA_TRUE && !sd->plugin_mode_and_over_plugin)
+ if (ret == EINA_FALSE && !sd->paused && !sd->plugin_mode_and_over_plugin)
_resume_all(sd);
evas_object_smart_callback_call(sd->widget, "zoom,finished", NULL);
}
+ _contents_scrolled(sd->base.self);
+
if (sd->enable_default_touch)
_elm_smart_touch_start(sd->touch_obj);
}
static void
+_contents_scrolled(Evas_Object *webview)
+{
+ ELM_WEBVIEW_SLOGD("\n");
+ if (!webview) return;
+ // at the end of zooming and scrolling,
+ // onscroll event should be generated when it is set to be suppressed during panning
+ if (ewk_view_setting_enable_onscroll_event_suppression_get(webview))
+ ewk_frame_onscroll_event_generate(ewk_view_frame_main_get(webview));
+}
+
+static void
_zoom_to_rect(Smart_Data *sd, Eina_Rectangle *rect, Eina_Rectangle *caret)
{
ELM_WEBVIEW_SLOGD("\n");
Evas_Coord to_y;
enum appcore_rm current_state = APPCORE_RM_UNKNOWN;
- int ret = appcore_get_rotation_state(¤t_state);
+ appcore_get_rotation_state(¤t_state);
ELM_WEBVIEW_SLOGD("current_state[%d]\n", current_state);
switch(current_state)
_adjust_to_contents_boundary(webview, &to_x, &to_y, from_x, from_y, zoom_rate);
// set data for smart zoom
- sd->zoom.basis.x = (to_x - zoom_step * from_x) / (1 - zoom_step) - view.x;
- sd->zoom.basis.y = (to_y - zoom_step * from_y) / (1 - zoom_step) - view.y;
+ if (zoom_step != 1)
+ {
+ sd->zoom.basis.x = (to_x - zoom_step * from_x) / (1 - zoom_step) - view.x;
+ sd->zoom.basis.y = (to_y - zoom_step * from_y) / (1 - zoom_step) - view.y;
+ }
+ else
+ {
+ sd->zoom.basis.x = from_x;
+ sd->zoom.basis.y = from_y;
+ }
sd->zoom.zoom_rate_at_start = current_zoom_rate;
sd->zoom.zoom_rate_to_set = zoom_rate;
ewk_frame_scroll_pos_get(ewk_view_frame_main_get(webview),
sd->zoom.scroll_to_set.y = sd->zoom.scroll_at_start.y + (from_y - to_y);
smart_zoom_index = N_COSINE - 1;
- if (sd->auto_suspend
+ if (!sd->paused
&& (ewk_view_user_scalable_get(sd->base.self) == EINA_TRUE)
&& (sd->zoom.zoom_rate_at_start != sd->zoom.zoom_rate_to_set))
_suspend_all(sd);
}
/**
- * @fn static void _update_min_zoom_rate(Evas_Object *obj)
- * @brief update min zoom rate
+ * @fn static void _geolocation_response_ok_callback(void *data, Evas_Object *object, void *event_info)
+ * @brief callback of geolocation permission dialog
*
- * @param[in] obj els-webview
+ * @param[in] data data
+ * @param[in] obj object
+ * @param[in] event_info event_info
*/
static void
-_update_min_zoom_rate(Evas_Object *obj)
+_geolocation_response_ok_callback(void *data, Evas_Object *object, void *event_info)
{
- INTERNAL_ENTRY;
-
- // do not calculate min_zoom_rate if we can not change the zoom rate
- if ((sd->zoom.scalable == EINA_FALSE)
- || (sd->zoom.min_zoom_rate == sd->zoom.max_zoom_rate))
- return;
-
- int content_w, object_w;
- evas_object_geometry_get(obj, NULL, NULL, &object_w, NULL);
- ewk_frame_contents_size_get(ewk_view_frame_main_get(obj), &content_w, NULL);
- if (!content_w) return;
-
- // get new min_zoom_rate
- if (!ewk_view_zoom_cairo_scaling_get(obj))
- content_w /= ewk_view_zoom_get(obj);
+ ELM_WEBVIEW_SLOGD("\n");
+ Smart_Data *sd = evas_object_smart_data_get(view_obj);
+ if (!sd) return;
- sd->zoom.min_zoom_rate = (float)object_w / (float)content_w;
- if (sd->zoom.min_zoom_rate <= 0)
- sd->zoom.min_zoom_rate = MIN_ZOOM_RATIO;
-
- sd->zoom.latest_min_zoom_rate = sd->zoom.min_zoom_rate;
-
- // set zoom range again
- ewk_view_zoom_range_set(obj, sd->zoom.min_zoom_rate, sd->zoom.max_zoom_rate);
+ ewk_geolocation_sharing_allowed_set(data, EINA_TRUE);
+ if (sd->geolocation_popup)
+ {
+ evas_object_del(sd->geolocation_popup);
+ sd->geolocation_popup = 0;
+ }
}
/**
- * @fn static void _geolocation_response_callback(void *data, Evas_Object *obj, void *event_info)
+ * @fn static void _geolocation_response_cancel_callback(void *data, Evas_Object *object, void *event_info)
* @brief callback of geolocation permission dialog
*
* @param[in] data data
- * @param[in] obj obj
+ * @param[in] obj object
* @param[in] event_info event_info
*/
static void
-_geolocation_response_callback(void *data, Evas_Object *obj, void *event_info)
+_geolocation_response_cancel_callback(void *data, Evas_Object *object, void *event_info)
{
- switch ((int)event_info)
- {
- case ELM_POPUP_RESPONSE_OK:
- ewk_geolocation_sharing_allowed_set(data, EINA_TRUE);
- evas_object_del(obj);
- break;
- case ELM_POPUP_RESPONSE_CANCEL:
- ewk_geolocation_sharing_allowed_set(data, EINA_FALSE);
- evas_object_del(obj);
- break;
- default:
- break;
- }
+ ELM_WEBVIEW_SLOGD("\n");
+ Smart_Data *sd = evas_object_smart_data_get(view_obj);
+ if (!sd) return;
+
+ ewk_geolocation_sharing_allowed_set(data, EINA_FALSE);
+ if (sd->geolocation_popup)
+ {
+ evas_object_del(sd->geolocation_popup);
+ sd->geolocation_popup = 0;
+ }
}
/**
_geolocation_permission_callback(void *geolocation_obj, const char *url)
{
ELM_WEBVIEW_SLOGD("\n");
- INTERNAL_ENTRY;
+ Smart_Data *sd = evas_object_smart_data_get(view_obj);
+ if (!sd) return;
if (geolocation_obj == NULL) return;
int length;
char *msg = NULL;
char msg2[] = " is requesting your current location."; //FIXME: Is this international?
+ Evas_Object *button = NULL;
length = strlen(url) + strlen(msg2);
msg = calloc(length + 1, sizeof(char));
msg[length] = '\0';
sd->geolocation_popup = elm_popup_add(sd->parent);
- evas_object_size_hint_weight_set(sd->geolocation_popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_popup_desc_set(sd->geolocation_popup, msg);
- elm_popup_buttons_add(sd->geolocation_popup, 2, "Allow", ELM_POPUP_RESPONSE_OK,
- "Deny", ELM_POPUP_RESPONSE_CANCEL, NULL);
- evas_object_smart_callback_add(sd->geolocation_popup, "response", _geolocation_response_callback, geolocation_obj);
+ elm_object_text_set(sd->geolocation_popup, msg);
+
+ button = elm_button_add(sd->geolocation_popup);
+ elm_object_text_set(button, "Allow");
+ elm_object_part_content_set(sd->geolocation_popup, "button1", button);
+ evas_object_smart_callback_add(button, "clicked", _geolocation_response_ok_callback, geolocation_obj);
+ evas_object_show(button);
+
+ button = elm_button_add(sd->geolocation_popup);
+ elm_object_text_set(button, "Deny");
+ elm_object_part_content_set(sd->geolocation_popup, "button2", button);
+ evas_object_smart_callback_add(button, "clicked", _geolocation_response_cancel_callback, geolocation_obj);
+ evas_object_show(button);
+
evas_object_show(sd->geolocation_popup);
free(msg);
}
}
}
+
+/* webkit context menus callbacks */
+
+/**
+ * @fn static void _smart_cb_contextmenu_new(void *data, Evas_Object *webview, void *arg)
+ * @brief contextmenu,new callback
+ *
+ * @param[in] data user data
+ * @param[in] webview webview
+ * @param[in] ev event info
+ */
+static void
+_smart_cb_contextmenu_new(void *data, Evas_Object *webview, void *arg)
+{
+ ELM_WEBVIEW_SLOGD("\n");
+ Elm_WebView_Editor* editor = (Elm_WebView_Editor *)data;
+ if (!editor) return;
+ els_webview_contextmenu_new(editor);
+}
+
+/**
+ * @fn static void _smart_cb_contextmenu_free(void *data, Evas_Object *webview, void *arg)
+ * @brief contextmenu,free callback
+ *
+ * @param[in] data user data
+ * @param[in] webview webview
+ * @param[in] ev event info
+ */
+static void
+_smart_cb_contextmenu_free(void *data, Evas_Object *webview, void *arg)
+{
+ ELM_WEBVIEW_SLOGD("\n");
+ Elm_WebView_Editor* editor = (Elm_WebView_Editor *)data;
+ if (!editor) return;
+ els_webview_contextmenu_del(editor);
+}
+
+/**
+ * @fn static void _smart_cb_contextmenu_item_appended(void *data, Evas_Object *webview, void *arg)
+ * @brief contextmenu,item,appended callback
+ *
+ * @param[in] data user data
+ * @param[in] webview webview
+ * @param[in] ev event info
+ */
+static void
+_smart_cb_contextmenu_item_appended(void *data, Evas_Object *webview, void *arg)
+{
+ ELM_WEBVIEW_SLOGD("\n");
+ Elm_WebView_Editor *editor = (Elm_WebView_Editor *)data;
+ if (!editor) return;
+
+ Ewk_Context_Menu *menu = (Ewk_Context_Menu *)arg;
+ if (!menu) return;
+
+ els_webview_contextmenu_item_appended(editor, menu);
+}
+
+/**
+ * @fn static void _smart_cb_contextmenu_customize(void *data, Evas_Object *webview, void *arg)
+ * @brief contextmenu,customize callback
+ *
+ * @param[in] data user data
+ * @param[in] webview webview
+ * @param[in] ev event info
+ */
+static void
+_smart_cb_contextmenu_customize(void *data, Evas_Object *webview, void *arg)
+{
+ ELM_WEBVIEW_SLOGD("\n");
+ evas_object_smart_callback_call(webview, "webview,contextmenu,customize", arg);
+}
+
+static void
+_smart_cb_contextmenu_save_as(void *data, Evas_Object *webview, void *arg)
+{
+ ELM_WEBVIEW_SLOGD("\n");
+ evas_object_smart_callback_call(webview, "webview,contextmenu,save,as", arg);
+}
+
+static void
+_smart_cb_contextmenu_sendvia_email(void *data, Evas_Object *webview, void *arg)
+{
+ ELM_WEBVIEW_SLOGD("\n");
+ evas_object_smart_callback_call(webview, "webview,contextmenu,sendvia,email", arg);
+}
+
+static void
+_smart_cb_contextmenu_sendvia_message(void *data, Evas_Object *webview, void *arg)
+{
+ ELM_WEBVIEW_SLOGD("\n");
+ evas_object_smart_callback_call(webview, "webview,contextmenu,sendvia,message", arg);
+}
+
+/**
+ * @fn static void _smart_cb_contextmenu_show(void *data, Evas_Object *webview, void *arg)
+ * @brief contextmenu,show callback
+ *
+ * @param[in] data user data
+ * @param[in] webview webview
+ * @param[in] ev event info
+ */
+static void
+_smart_cb_contextmenu_show(void *data, Evas_Object *webview, void *arg)
+{
+ ELM_WEBVIEW_SLOGD("\n");
+ Elm_WebView_Editor *editor = (Elm_WebView_Editor *)data;
+ if (!editor) return;
+
+ Ewk_Context_Menu *menu = (Ewk_Context_Menu *)arg;
+ if (!menu) return;
+
+ els_webview_contextmenu_show(editor, menu);
+}
+
/**
* @fn static Eina_Bool _focus_ring_exceptional_url_get(Evas_Object *webview)
* @brief get whether current url should not use focus ring.
void _elm_smart_webview_default_layout_width_set(Evas_Object *obj, int width);
void _elm_smart_webview_layout_width_set_to_container(Evas_Object *obj);
void _elm_smart_webview_input_field_zoom_set(Evas_Object *obj, Eina_Bool zoom);
+Eina_Bool _elm_smart_webview_input_field_zoom_get(Evas_Object *obj);
void _elm_smart_webview_auto_suspend_set(Evas_Object *obj, Eina_Bool auto_suspend);
#ifdef BOUNCING_SUPPORT
void _elm_smart_webview_container_set(Evas_Object *obj, Evas_Object *container);
void _elm_smart_webview_context_menu_item_selected(Evas_Object* obj, Ewk_Context_Menu_Item* webkit_context_menu_item);
void _elm_smart_webview_enable_default_touch_set(Evas_Object *obj, Eina_Bool enable);
void _elm_smart_webview_horizontal_panning_hold_set(Evas_Object *obj, Eina_Bool hold);
+Eina_Bool _elm_smart_webview_horizontal_panning_hold_get(Evas_Object *obj);
void _elm_smart_webview_vertical_panning_hold_set(Evas_Object *obj, Eina_Bool hold);
+Eina_Bool _elm_smart_webview_vertical_panning_hold_get(Evas_Object *obj);
void _elm_smart_webview_text_selection_clear(Evas_Object *obj);
void _elm_smart_webview_cbhm_run(Evas_Object *obj);
void _elm_smart_webview_uri_set(Evas_Object *obj, const char *uri);
+const char* _elm_smart_webview_uri_get(Evas_Object *obj);
void _elm_smart_webview_use_mouse_down_delay_set(Evas_Object *obj, Eina_Bool use_mouse_down_delay);
Eina_Bool _elm_smart_webview_use_mouse_down_delay_get(Evas_Object *obj);
Eina_Bool _elm_webview_fixed_position_get(Evas_Object *obj);
void _elm_smart_webview_widget_set(Evas_Object *obj, Evas_Object *wid);
void _elm_smart_webview_show_ime_on_autofocus_set(Evas_Object *obj, Eina_Bool enable);
Eina_Bool _elm_smart_webview_show_ime_on_autofocus_get(Evas_Object *obj);
+void _elm_smart_webview_use_tilt_zoom_set(Evas_Object *obj, Eina_Bool enable);
+Eina_Bool _elm_webview_show_magnifier_get(Evas_Object *obj);
+void _elm_webview_show_magnifier_set(Evas_Object *obj, Eina_Bool enable);
+
+Eina_Bool _elm_webview_back(Evas_Object *obj);
+Eina_Bool _elm_webview_back_possible(Evas_Object *obj);
+Eina_Bool _elm_webview_forward(Evas_Object *obj);
+Eina_Bool _elm_webview_forward_possible(Evas_Object *obj);
+Eina_Bool _elm_webview_navigate(Evas_Object *obj, int steps);
+Eina_Bool _elm_webview_navigate_possible(Evas_Object *obj, int steps);
+Eina_Bool _elm_webview_contents_set(Evas_Object *obj, const char *contents, size_t contents_size, const char *mime_type, const char *encoding, const char *base_uri);
+Eina_Bool _elm_webview_reload(Evas_Object *obj);
+Eina_Bool _elm_webview_stop(Evas_Object *obj);
+Eina_Bool _elm_webview_zoom_set(Evas_Object *obj, float zoom);
+float _elm_webview_zoom_get(Evas_Object *obj);
+Eina_Bool _elm_webview_zoom_in_possible(Evas_Object *obj);
+Eina_Bool _elm_webview_zoom_out_possible(Evas_Object *obj);
+Eina_Bool _elm_webview_scroll_by(Evas_Object *obj, int dx, int dy);
+Eina_Bool _elm_webview_scroll_pos_set(Evas_Object *obj, int x, int y);
+Eina_Bool _elm_webview_scroll_pos_get(Evas_Object *obj, int *x, int *y);
+const char* _elm_webview_title_get(Evas_Object *obj);
+Eina_Bool _elm_webview_text_search(Evas_Object *obj, const char* string, Eina_Bool case_sensitive, Eina_Bool forward, Eina_Bool wrap);
+unsigned int _elm_webview_text_matches_mark(Evas_Object *obj, const char *string, Eina_Bool case_sensitive, Eina_Bool highlight, unsigned int limit);
+Eina_Bool _elm_webview_text_matches_unmark_all(Evas_Object *obj);
+Eina_Bool _elm_webview_text_matches_highlight_set(Evas_Object *obj, Eina_Bool highlight);
+Eina_Bool _elm_webview_text_matches_highlight_get(Evas_Object *obj);
+void _elm_webview_pause(Evas_Object *obj);
+void _elm_webview_resume(Evas_Object *obj);
+
#endif /*#ifndef els_webview_h */
#include <Ecore_X.h>
#include <EWebKit.h>
#include <cairo.h>
-#include <elm_widget.h>
-#define TIZEN_HD_BLUE_THEME "blue-hd"
-#define TIZEN_HD_BLACK_THEME "tizen-black-hd"
-#define TIZEN_HD_BLUE_THEME_EDJ "/usr/share/elementary/themes/blue-hd.edj"
-#define TIZEN_HD_BLACK_THEME_EDJ "/usr/share/elementary/themes/tizen-black-hd.edj"
-#define TIZEN_HD_WHITE_THEME_EDJ "/usr/share/elementary/themes/tizen-hd.edj"
+#define TIZEN_THEME "grey-hd"
+#define TIZEN_THEME_EDJ "/usr/share/elementary/themes/" TIZEN_THEME ".edj"
+
#define LEFT_HANDLE_ICON_EDJ_PATH "elm/entry/selection/block_handle_left"
#define RIGHT_HANDLE_ICON_EDJ_PATH "elm/entry/selection/block_handle_right"
#define LARGE_HANDLE_ICON_EDJ_PATH "elm/entry/selection/block_handle"
+#define PARAGRAPH_SELECTION_EDJ_PATH "elm-webview/paragraph"
+#define PARAGRAPH_HANDLE_ICON_EDJ_PATH "elm/page/item/default_5" /* Temporary - use better icon here */
#define TEXT_SELECTION_MAGNIFIER_OFFSET_Y 30
#define TEXT_SELECTION_MAGNIFIER_LINES_NUMBER 3
#define TEXT_SELECTION_DRAG_THRESHOLD_X 5
#define TEXT_SELECTION_DRAG_THRESHOLD_Y 10
-#define FILE_PROTOCOL_STR_LEN 8
+#define FILE_PROTOCOL_STR "file://"
+#define PARAGRAPH_SELECTION 0
#define IMAGE_RESIZE_RATIO 0.95
#define HTML_IMG_TAG_LEN 2048
#define PASTE_DATA_CB_STR "_paste_data_cb"
-#define PASTE_DATA_CB_LEN 14
#define CBHM_PASTE_DATA_CB_STR "_cbhm_paste_data_cb"
-#define CBHM_PASTE_DATA_CB_LEN 19
typedef struct _Text_Selection_Handle Text_Selection_Handle;
struct _Text_Selection_Handle
Elm_Drop_Cb paste_function;
Elm_Drop_Cb cbhm_paste_function;
Ecore_Event_Handler* selection_clear_handler;
+ Paragraph_Selection* paragraph_selection;
+};
+
+struct _Paragraph_Selection {
+ Evas_Object* rect;
+ Eina_Bool is_shown;
+ Elm_WebView_Editor* editor; /* Keep this here to avoid passing sd structure to selection functions. */
+
+ Text_Selection_Handle* top_handle;
+ Text_Selection_Handle* bottom_handle;
+ Text_Selection_Handle* left_handle;
+ Text_Selection_Handle* right_handle;
};
/* mouse gesture callbacks */
static void _smart_cb_editorclient_selection_changed(void *data, Evas_Object *webview, void *arg);
static void _smart_cb_editorclient_contents_changed(void *data, Evas_Object *webview, void *arg);
-/* webkit context menus callbacks */
-static void _smart_cb_contextmenu_new(void *data, Evas_Object *webview, void *arg);
-static void _smart_cb_contextmenu_item_appended(void *data, Evas_Object *webview, void *arg);
-static void _smart_cb_contextmenu_customize(void *data, Evas_Object *webview, void *arg);
-static void _smart_cb_contextmenu_show(void *data, Evas_Object *webview, void *arg);
-static void _smart_cb_contextmenu_free(void *data, Evas_Object *webview, void *arg);
-
-/* context menus handling functions */
-static void _webview_contextmenu_show(Elm_WebView_Editor *editor);
-static void _webview_contextmenu_move(Elm_WebView_Editor *editor);
-static void _webview_contextmenu_hide(Elm_WebView_Editor *editor);
-static void _webview_contextmenu_del(Elm_WebView_Editor *editor);
-
/* general text selection handles functions */
static Eina_Bool _text_selection_handle_init(Elm_WebView_Editor *editor, Text_Selection_Handle* handle, const char* edj_file_path, const char* handle_icon_edj_path);
static void _text_selection_handle_mouse_down(void *data, Evas *e, Evas_Object *o, void *event_info);
static void _coords_evas_to_ewk(Evas_Object *webview, int x, int y, int* ux, int* uy);
static void _coords_ewk_to_evas(Evas_Object *webview, int x, int y, int* ux, int* uy);
+/* paragraph selection functions */
+#if PARAGRAPH_SELECTION
+static Paragraph_Selection* _paragraph_selection_init(Elm_WebView_Editor *editor, const char* selection_edje_path, const char* selection_group);
+static void _paragraph_selection_show(Paragraph_Selection *paragraph_selection);
+static void _paragraph_selection_hide(Paragraph_Selection *paragraph_selection);
+static void _paragraph_selection_move(Paragraph_Selection *paragraph_selection, int x, int y);
+static void _paragraph_selection_resize(Paragraph_Selection *paragraph_selection, int w, int h);
+static void _paragraph_selection_update(Paragraph_Selection *paragraph_selection, Eina_Bool calculate_webkit_selection);
+static void _paragraph_selection_destroy(Paragraph_Selection **paragraph_selection);
+static void _paragraph_selection_calculate_popup_position(Elm_WebView_Editor *editor);
+#endif
+
/* static variable needed to check if the x selection event was called by this webview */
static Evas_Object *cnpwidgetdata = NULL;
return NULL;
}
+ editor->paragraph_selection = NULL;
+
editor->webview = webview;
editor->magnifier_popup_move_job = NULL;
Eina_Bool handles_initialized = EINA_FALSE;
if (editor->front_handle && editor->back_handle && editor->large_handle)
{
- if (strstr(elm_theme_get(NULL), TIZEN_HD_BLUE_THEME))
- {
- if(_text_selection_handle_init(editor, editor->front_handle, TIZEN_HD_BLUE_THEME_EDJ, LEFT_HANDLE_ICON_EDJ_PATH))
- if(_text_selection_handle_init(editor, editor->back_handle, TIZEN_HD_BLUE_THEME_EDJ, RIGHT_HANDLE_ICON_EDJ_PATH))
- handles_initialized = _text_selection_handle_init(editor, editor->large_handle, TIZEN_HD_BLUE_THEME_EDJ, LARGE_HANDLE_ICON_EDJ_PATH);
- }
- else if (strstr(elm_theme_get(NULL), TIZEN_HD_BLACK_THEME))
- {
- if(_text_selection_handle_init(editor, editor->front_handle, TIZEN_HD_BLACK_THEME_EDJ, LEFT_HANDLE_ICON_EDJ_PATH))
- if(_text_selection_handle_init(editor, editor->back_handle, TIZEN_HD_BLACK_THEME_EDJ, RIGHT_HANDLE_ICON_EDJ_PATH))
- handles_initialized = _text_selection_handle_init(editor, editor->large_handle, TIZEN_HD_BLACK_THEME_EDJ, LARGE_HANDLE_ICON_EDJ_PATH);
- }
- else
+ if (strstr(elm_theme_get(NULL), TIZEN_THEME))
{
- if(_text_selection_handle_init(editor, editor->front_handle, TIZEN_HD_WHITE_THEME_EDJ, LEFT_HANDLE_ICON_EDJ_PATH))
- if(_text_selection_handle_init(editor, editor->back_handle, TIZEN_HD_WHITE_THEME_EDJ, RIGHT_HANDLE_ICON_EDJ_PATH))
- handles_initialized = _text_selection_handle_init(editor, editor->large_handle, TIZEN_HD_WHITE_THEME_EDJ, LARGE_HANDLE_ICON_EDJ_PATH);
+ if(_text_selection_handle_init(editor, editor->front_handle, TIZEN_THEME_EDJ, LEFT_HANDLE_ICON_EDJ_PATH))
+ if(_text_selection_handle_init(editor, editor->back_handle, TIZEN_THEME_EDJ, RIGHT_HANDLE_ICON_EDJ_PATH))
+ handles_initialized = _text_selection_handle_init(editor, editor->large_handle, TIZEN_THEME_EDJ, LARGE_HANDLE_ICON_EDJ_PATH);
}
}
return NULL;
}
+#if PARAGRAPH_SELECTION
+ if (!editor->paragraph_selection)
+ editor->paragraph_selection = _paragraph_selection_init(editor, EDJEDIR"/ewebview.edj", PARAGRAPH_SELECTION_EDJ_PATH);
+
+ if (!editor->paragraph_selection)
+ {
+ ELM_WEBVIEW_SLOGE("Paragraph selection not initialized.\n");
+ return NULL;
+ }
+#endif
+
editor->magnifier.height = TEXT_SELECTION_MAGNIFIER_LINES_NUMBER * TEXT_SELECTION_MAGNIFIER_LINE_SIZE;
editor->magnifier.width = 0;
editor->magnifier.evas_image = NULL;
ELM_WEBVIEW_SLOGD("\n");
_text_selection_off(editor);
+#if PARAGRAPH_SELECTION
+ _paragraph_selection_destroy(&editor->paragraph_selection);
+#endif
evas_object_smart_callback_del(editor->webview, "context,menu", _smart_cb_context_menu);
evas_object_smart_callback_del(editor->webview, "text,selection", _smart_cb_text_selection);
evas_object_smart_callback_del(editor->webview, "editorclient,selection,changed", _smart_cb_editorclient_selection_changed);
evas_object_smart_callback_del(editor->webview, "editorclient,contents,changed", _smart_cb_editorclient_contents_changed);
- if (editor->enable_default_context_menu)
- {
- evas_object_smart_callback_del(editor->webview, "contextmenu,new", _smart_cb_contextmenu_new);
- evas_object_smart_callback_del(editor->webview, "contextmenu,item,appended", _smart_cb_contextmenu_item_appended);
- evas_object_smart_callback_del(editor->webview, "contextmenu,customize", _smart_cb_contextmenu_customize);
- evas_object_smart_callback_del(editor->webview, "contextmenu,show", _smart_cb_contextmenu_show);
- evas_object_smart_callback_del(editor->webview, "contextmenu,free", _smart_cb_contextmenu_free);
- }
-
if (editor->selection_clear_handler)
ecore_event_handler_del(editor->selection_clear_handler);
evas_object_smart_member_del(editor->large_handle->handle_icon);
evas_object_del(editor->front_handle->handle_icon);
evas_object_del(editor->back_handle->handle_icon);
- evas_object_del(editor->back_handle->handle_icon);
+ evas_object_del(editor->large_handle->handle_icon);
free(editor->front_handle);
free(editor->back_handle);
free(editor->large_handle);
EINA_SAFETY_ON_NULL_RETURN(editor);
ELM_WEBVIEW_SLOGD("\n");
+#if PARAGRAPH_SELECTION
+ if (editor->text_selection_mode & TEXT_SELECTION_PARAGRAPH)
+ _paragraph_selection_calculate_popup_position(editor);
+ else
+#endif
if (diff)
{
editor->contextmenu_data->mouse_down_event.canvas.x -= diff->x;
editor->contextmenu_data->mouse_down_event.canvas.y -= diff->y;
}
+
if (editor->text_selection_mode & TEXT_SELECTION_TWO_HANDLES)
_text_selection_handles_update_position(editor);
if (editor->text_selection_mode & TEXT_SELECTION_LARGE_HANDLE)
_text_selection_large_handle_update_position(editor);
if ((editor->text_selection_mode & TEXT_SELECTION_POPUP)
&& !(editor->text_selection_mode & TEXT_SELECTION_PAN_START))
- _webview_contextmenu_move(editor);
+ els_webview_contextmenu_move(editor);
+#if PARAGRAPH_SELECTION
+ if (editor->text_selection_mode & TEXT_SELECTION_PARAGRAPH)
+ {
+ if (diff) /* Scrolling */
+ _paragraph_selection_update(editor->paragraph_selection, EINA_FALSE);
+ else
+ _paragraph_selection_update(editor->paragraph_selection, EINA_TRUE);
+ }
+#endif
}
/**
els_webview_editor_selection_mode_change(Elm_WebView_Editor* editor, Text_Selection_Mode mode)
{
EINA_SAFETY_ON_NULL_RETURN(editor);
- ELM_WEBVIEW_SLOGD("\n");
_text_selection_mode_change(editor, mode);
}
els_webview_editor_selection_mode_get(Elm_WebView_Editor* editor)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(editor, TEXT_SELECTION_MODE_OFF);
- ELM_WEBVIEW_SLOGD("\n");
return editor->text_selection_mode;
}
{
EINA_SAFETY_ON_NULL_RETURN(editor);
ELM_WEBVIEW_SLOGD("\n");
-
- if (editor->enable_default_context_menu != enable)
- {
- editor->enable_default_context_menu = enable;
- if (enable == EINA_TRUE)
- {
-#define CONNECT(s,c) evas_object_smart_callback_add(editor->webview, s, c, editor)
- CONNECT("contextmenu,new", _smart_cb_contextmenu_new);
- CONNECT("contextmenu,item,appended", _smart_cb_contextmenu_item_appended);
- CONNECT("contextmenu,customize", _smart_cb_contextmenu_customize);
- CONNECT("contextmenu,show", _smart_cb_contextmenu_show);
- CONNECT("contextmenu,free", _smart_cb_contextmenu_free);
-#undef CONNECT
- }
- else
- {
-#define DISCONNECT(s,c) evas_object_smart_callback_del(editor->webview, s, c)
- DISCONNECT("contextmenu,new", _smart_cb_contextmenu_new);
- DISCONNECT("contextmenu,item,appended", _smart_cb_contextmenu_item_appended);
- DISCONNECT("contextmenu,customize", _smart_cb_contextmenu_customize);
- DISCONNECT("contextmenu,show", _smart_cb_contextmenu_show);
- DISCONNECT("contextmenu,free", _smart_cb_contextmenu_free);
-#undef DISCONNECT
- }
- }
}
/**
if (ewk_context_menu_item_action_get(webkit_context_menu_item) == EWK_CONTEXT_MENU_ITEM_TAG_PASTE)
{
editor->pasted_item = webkit_context_menu_item;
- elm_cnp_selection_get(ELM_SEL_TYPE_CLIPBOARD, (ELM_SEL_FORMAT_HTML | ELM_SEL_FORMAT_IMAGE), editor->widget, editor->paste_function, (void *)editor);
+ elm_cnp_selection_get(editor->widget, ELM_SEL_TYPE_CLIPBOARD, (ELM_SEL_FORMAT_HTML | ELM_SEL_FORMAT_IMAGE), editor->paste_function, (void *)editor);
_text_selection_mode_change(editor, TEXT_SELECTION_INPUT);
return;
}
Eina_Bool
els_webview_editor_show_magnifier_get(Elm_WebView_Editor* editor)
{
- EINA_SAFETY_ON_NULL_RETURN(editor);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(editor, EINA_FALSE);
ELM_WEBVIEW_SLOGD("\n");
return editor->magnifier.enable;
editor->magnifier.enable = enable;
}
-/* --------------------============================== INTERNAL ==============================-------------------- */
-
-/* mouse gesture callbacks */
-
+/* context menus handling functions */
/**
- * @fn static void _smart_cb_mouse_long_move_start(void *data, Evas_Object *webview, void *ev)
- * @brief long,move,start callback
+ * @fn void els_webview_contextmenu_new(Elm_Webview_Editor* editor)
+ * @brief Prepares context menus to be shown by application.
*
- * @param[in] data user data
- * @param[in] webview webview
- * @param[in] ev event info
+ * @param[in] editor an editor object.
*/
-static void
-_smart_cb_mouse_long_move_start(void *data, Evas_Object *webview, void *ev)
+void
+els_webview_contextmenu_new(Elm_WebView_Editor* editor)
{
- ELM_WEBVIEW_SLOGD("\n");
- Elm_WebView_Editor* editor = (Elm_WebView_Editor *)data;
- if (!editor) return;
+ ELM_WEBVIEW_SLOGD("\n");
+ if (!editor) return;
- if (editor->text_selection_mode == TEXT_SELECTION_MODE_LARGE_HANDLE_POPUP)
- _text_selection_mode_change(editor, TEXT_SELECTION_MODE_LARGE_HANDLE_MAGNIFIER);
+ Evas_Object *webview = editor->webview;
+ if (!webview) return;
+ editor->contextmenu_data->is_text_selection = !!editor->text_selection_mode;
+ evas_object_smart_callback_call(webview, "webview,contextmenu,new", (void *)editor->contextmenu_data);
}
/**
- * @fn static void _smart_cb_mouse_long_move(void *data, Evas_Object *webview, void *ev)
- * @brief long,move callback
+ * @fn void els_webview_contextmenu_show(Elm_WebView_Editor* editor, Ewk_Context_Menu* menu)
+ * @brief Prepares context menus to be shown by application.
*
- * @param[in] data user data
- * @param[in] webview webview
- * @param[in] ev event info
+ * @param[in] editor an editor object.
*/
-static void
-_smart_cb_mouse_long_move(void *data, Evas_Object *webview, void *ev)
+void
+els_webview_contextmenu_show(Elm_WebView_Editor* editor, Ewk_Context_Menu* menu)
{
ELM_WEBVIEW_SLOGD("\n");
- Elm_WebView_Editor* editor = (Elm_WebView_Editor *)data;
- if (!editor) return;
+ if (!editor || !menu) return;
+ Evas_Object *webview = editor->webview;
+ if (!webview) return;
- Evas_Point* point = (Evas_Point*)ev;
- int x, y;
- _coords_evas_to_ewk(webview, point->x, point->y, &x, &y);
+ editor->contextmenu_data->webkit_context_menu = menu;
- if (editor->text_selection_mode == TEXT_SELECTION_MAGNIFIER)
+ // set mouse_down_event as a position of front handle, large handle or a caret respectively
+ editor->contextmenu_data->mouse_down_event = editor->mouse_down;
+ if (editor->text_selection_mode & TEXT_SELECTION_TWO_HANDLES)
{
- Eina_Rectangle left_handle, right_handle;
- Eina_Bool ret = ewk_frame_select_closest_word(ewk_view_frame_focused_get(editor->webview), x, y, &left_handle, &right_handle);
- if (ret && !editor->magnifier.set_zoom)
- {
- editor->magnifier.zoom = (float)TEXT_SELECTION_MAGNIFIER_LINE_SIZE / (float)left_handle.h;
- if (editor->magnifier.zoom < 1.0)
- editor->magnifier.zoom = 1.0;
- editor->magnifier.set_zoom = EINA_TRUE;
- }
- _magnifier_move(editor, point->x, point->y);
+ editor->contextmenu_data->mouse_down_event.canvas.x = editor->front_handle->handle_pos.x;
+ editor->contextmenu_data->mouse_down_event.canvas.y = editor->front_handle->handle_pos.y;
}
- else if (editor->text_selection_mode == TEXT_SELECTION_MODE_LARGE_HANDLE_MAGNIFIER)
+ else if (editor->text_selection_mode & TEXT_SELECTION_LARGE_HANDLE)
{
- if (ewk_frame_caret_position_set(ewk_view_frame_focused_get(editor->webview), x, y))
- _text_selection_large_handle_update_position(editor);
-
- _magnifier_move(editor, point->x, point->y);
+ editor->contextmenu_data->mouse_down_event.canvas.x = editor->large_handle->handle_pos.x;
+ editor->contextmenu_data->mouse_down_event.canvas.y = editor->large_handle->handle_pos.y;
}
-}
-
-/**
- * @fn static void _smart_cb_mouse_long_move_end(void *data, Evas_Object *webview, void *ev)
- * @brief long,move,end callback
- *
- * @param[in] data user data
- * @param[in] webview webview
- * @param[in] ev event info
- */
-static void
-_smart_cb_mouse_long_move_end(void *data, Evas_Object *webview, void *ev)
-{
- ELM_WEBVIEW_SLOGD("\n");
- Elm_WebView_Editor* editor = (Elm_WebView_Editor *)data;
- if (!editor) return;
-
- Evas_Point* point = (Evas_Point*)ev;
- editor->mouse_down.canvas.x = point->x;
- editor->mouse_down.canvas.y = point->y;
-
- if (editor->text_selection_mode == TEXT_SELECTION_MODE_LARGE_HANDLE_MAGNIFIER)
- _text_selection_mode_change(editor, TEXT_SELECTION_MODE_LARGE_HANDLE_POPUP);
- else if (editor->text_selection_mode == TEXT_SELECTION_MAGNIFIER)
+ else if ((editor->text_selection_mode & TEXT_SELECTION_INPUT)
+ && !(editor->contextmenu_data->hit_test_result_context & EWK_HIT_TEST_RESULT_CONTEXT_IMAGE))
{
- int ewk_x, ewk_y;
- _coords_evas_to_ewk(webview, point->x, point->y, &ewk_x, &ewk_y);
- Ewk_Hit_Test *hit_test = ewk_frame_hit_test_new(ewk_view_frame_focused_get(webview), ewk_x, ewk_y);
- /* if during magnifier drag we stumble upon editable field we decide to do selection there but we have set proper selection mode */
- if (hit_test->context & EWK_HIT_TEST_RESULT_CONTEXT_EDITABLE)
- _text_selection_mode_change(editor, TEXT_SELECTION_MODE_INPUT_HANDLES_POPUP);
- else
- _text_selection_mode_change(editor, TEXT_SELECTION_MODE_HANDLES_POPUP);
- ewk_frame_hit_test_free(hit_test);
+ int x, y, w, h;
+ if (ewk_frame_caret_position_get(ewk_view_frame_focused_get(webview), &x, &y, &w, &h))
+ {
+ _coords_ewk_to_evas(webview, x, y, &x, &y);
+ editor->contextmenu_data->mouse_down_event.canvas.x = x;
+ editor->contextmenu_data->mouse_down_event.canvas.y = y + h;
+ }
}
- else
- _text_selection_mode_change(editor, TEXT_SELECTION_MODE_OFF);
-}
-
-/* context menu and text selection caller callbacks */
-
-/**
- * @fn static void _smart_cb_context_menu(void *data, Evas_Object *webview, void *ev)
- * @brief context,menu callback
- *
- * @param[in] data user data
- * @param[in] webview webview
- * @param[in] ev event info
- */
-static void
-_smart_cb_context_menu(void *data, Evas_Object *webview, void *ev)
-{
- ELM_WEBVIEW_SLOGD("\n");
- Elm_WebView_Editor* editor = (Elm_WebView_Editor *)data;
- if (!editor) return;
-
- editor->contextmenu_data->mouse_down_event = editor->mouse_down;
- ewk_view_context_menu_forward_event(webview, &editor->mouse_down);
+#if PARAGRAPH_SELECTION
+ else if (editor->text_selection_mode & TEXT_SELECTION_PARAGRAPH)
+ _paragraph_selection_calculate_popup_position(editor);
+#endif
+ ELM_WEBVIEW_SLOGD("pos: x: %d y: %d\n", editor->contextmenu_data->mouse_down_event.canvas.x, editor->contextmenu_data->mouse_down_event.canvas.y);
+ evas_object_smart_callback_call(webview, "webview,contextmenu,show", (void *) editor->contextmenu_data);
}
/**
- * @fn static void _smart_cb_text_selection(void *data, Evas_Object *webview, void *ev)
- * @brief text,selection callback
+ * @fn void els_webview_contextmenu_move(Elm_WebView_Editor* editor)
+ * @brief Informs application that context menu should be moved.
*
- * @param[in] data user data
- * @param[in] webview webview
- * @param[in] ev event info
+ * @param[in] editor an editor object.
*/
-static void
-_smart_cb_text_selection(void *data, Evas_Object *webview, void *ev)
+void
+els_webview_contextmenu_move(Elm_WebView_Editor* editor)
{
ELM_WEBVIEW_SLOGD("\n");
- Elm_WebView_Editor* editor = (Elm_WebView_Editor *)data;
if (!editor) return;
- Evas_Point* point = (Evas_Point*)ev;
-
- int ewk_x, ewk_y;
- _coords_evas_to_ewk(webview, point->x, point->y, &ewk_x, &ewk_y);
+ Evas_Object *webview = editor->webview;
+ if (!webview) return;
- Ewk_Hit_Test_Result_Context hit_test_context = editor->contextmenu_data->hit_test_result_context;
- if (!((hit_test_context & EWK_HIT_TEST_RESULT_CONTEXT_LINK)
- || (hit_test_context & EWK_HIT_TEST_RESULT_CONTEXT_MEDIA)))
+ Evas_Point new_pos;
+ // set mouse_down_event as a position of front handle, large handle or a caret respectively otherwise last clicked position
+ new_pos.x = editor->contextmenu_data->mouse_down_event.canvas.x;
+ new_pos.y = editor->contextmenu_data->mouse_down_event.canvas.y;
+ if (editor->text_selection_mode & TEXT_SELECTION_TWO_HANDLES)
{
- if (hit_test_context & EWK_HIT_TEST_RESULT_CONTEXT_EDITABLE)
- {
- if (hit_test_context & EWK_HIT_TEST_RESULT_CONTEXT_IMAGE)
- _text_selection_mode_change(editor, TEXT_SELECTION_MODE_INPUT_POPUP);
- else
- _text_selection_mode_change(editor, TEXT_SELECTION_MODE_LARGE_HANDLE_POPUP);
- }
- else if (hit_test_context & EWK_HIT_TEST_RESULT_CONTEXT_TEXT)
- _text_selection_mode_change(editor, TEXT_SELECTION_MAGNIFIER);
+ new_pos.x = editor->front_handle->handle_pos.x;
+ new_pos.y = editor->front_handle->handle_pos.y;
}
-}
-
-/* webkit editor client callbacks */
-
-/**
- * @fn static void _smart_cb_editorclient_selection_changed(void *data, Evas_Object *webview, void *arg)
- * @brief editorclientselection,changed callback
- *
- * @param[in] data user data
- * @param[in] webview webview
- * @param[in] ev event info
- */
-static void
-_smart_cb_editorclient_selection_changed(void *data, Evas_Object *webview, void *arg)
-{
- ELM_WEBVIEW_SLOGD("\n");
-
- Elm_WebView_Editor* editor = (Elm_WebView_Editor *)data;
- if (!editor) return;
-
- switch (ewk_frame_text_selection_type_get(ewk_view_frame_focused_get(webview)))
+ else if ((editor->text_selection_mode & TEXT_SELECTION_INPUT)
+ &&!(editor->contextmenu_data->hit_test_result_context & EWK_HIT_TEST_RESULT_CONTEXT_IMAGE))
{
- case EWK_TEXT_SELECTION_NONE:
- ELM_WEBVIEW_SLOGD("no selection - text_selection_mode %d\n", editor->text_selection_mode);
- /* besides we receive 'no selection' we do not clear selection when magnifier is active */
- if (!(editor->text_selection_mode & TEXT_SELECTION_MAGNIFIER))
- _text_selection_mode_change(editor, TEXT_SELECTION_MODE_OFF);
- break;
-
- case EWK_TEXT_SELECTION_CARET:
- ELM_WEBVIEW_SLOGD("caret selection - text_selection_mode %d\n", editor->text_selection_mode);
- if (!(editor->text_selection_mode & TEXT_SELECTION_MAGNIFIER)) //if we are in magnifier mode then ignore this event
+ int x, y, w, h;
+ if (ewk_frame_caret_position_get(ewk_view_frame_main_get(webview), &x, &y, &w, &h))
{
- if (!(editor->text_selection_mode & TEXT_SELECTION_INPUT))
- _text_selection_mode_change(editor, TEXT_SELECTION_MODE_OFF); //if we receive this event outside text input field then clear selection
- if ((editor->text_selection_mode & TEXT_SELECTION_INPUT) && (editor->text_selection_mode & TEXT_SELECTION_MOUSE_DOWN))
- _text_selection_mode_change(editor, TEXT_SELECTION_INPUT); //if during a text selection input selection was changed due click event remove MOUSE_DOWN
+ Eina_Rectangle view;
+ evas_object_geometry_get(webview, &view.x, &view.y, &view.w, &view.h);
+ _coords_ewk_to_evas(webview, x, y, &x, &y);
+ if (x < view.x || x > (view.x + view.w) || y < (view.y - h) || y > (view.y + view.h))
+ {
+ /* if caret position is outside a viewport hide popup and large handle */
+ _text_selection_mode_change(editor, TEXT_SELECTION_INPUT);
+ return;
+ }
+ new_pos.x = x;
+ new_pos.y = y + h;
}
- break;
-
- case EWK_TEXT_SELECTION_RANGE:
- ELM_WEBVIEW_SLOGD("range selection - text_selection_mode %d\n", editor->text_selection_mode);
- break;
- }
+ else
+ {
+ ELM_WEBVIEW_SLOGD("No two handles, no large handle, no caret, clearing text selection");
+ _text_selection_mode_change(editor, TEXT_SELECTION_MODE_OFF);
+ }
+ }
+#if PARAGRAPH_SELECTION
+ else if (editor->text_selection_mode & TEXT_SELECTION_PARAGRAPH)
+ _paragraph_selection_calculate_popup_position(editor);
+#endif
+ ELM_WEBVIEW_SLOGD("pos: x: %d y: %d\n", new_pos.x, new_pos.y);
+ evas_object_smart_callback_call(webview, "webview,contextmenu,move", (void *) &new_pos);
}
/**
- * @fn static void _smart_cb_editorclient_contents_changed(void *data, Evas_Object *webview, void *arg)
- * @brief editorclientcontents,changed callback
+ * @fn void els_webview_contextmenu_hide(Elm_WebView_Editor* editor)
+ * @brief Informs application that context menu should be hidden.
*
- * @param[in] data user data
- * @param[in] webview webview
- * @param[in] ev event info
+ * @param[in] editor an editor object.
*/
-static void
-_smart_cb_editorclient_contents_changed(void *data, Evas_Object *webview, void *arg)
+void
+els_webview_contextmenu_hide(Elm_WebView_Editor* editor)
{
ELM_WEBVIEW_SLOGD("\n");
-
- Elm_WebView_Editor* editor = (Elm_WebView_Editor *)data;
if (!editor) return;
-
- _text_selection_mode_change(editor, TEXT_SELECTION_INPUT);
+ Evas_Object *webview = editor->webview;
+ if (!webview) return;
+ evas_object_smart_callback_call(webview, "webview,contextmenu,hide", NULL);
}
-/* webkit context menus callbacks */
-
/**
- * @fn static void _smart_cb_contextmenu_new(void *data, Evas_Object *webview, void *arg)
- * @brief contextmenu,new callback
+ * @fn void els_webview_contextmenu_del(Elm_WebView_Editor* editor)
+ * @brief Informs application that context menu should be deleted.
*
- * @param[in] data user data
- * @param[in] webview webview
- * @param[in] ev event info
+ * @param[in] editor an editor object.
*/
-static void
-_smart_cb_contextmenu_new(void *data, Evas_Object *webview, void *arg)
+void
+els_webview_contextmenu_del(Elm_WebView_Editor* editor)
{
ELM_WEBVIEW_SLOGD("\n");
- Elm_WebView_Editor* editor = (Elm_WebView_Editor *)data;
if (!editor) return;
-
- editor->contextmenu_data->is_text_selection = !!editor->text_selection_mode;
- evas_object_smart_callback_call(webview, "webview,contextmenu,new", (void *)editor->contextmenu_data);
+ Evas_Object *webview = editor->webview;
+ if (!webview) return;
+ evas_object_smart_callback_call(webview, "webview,contextmenu,del", NULL);
}
/**
- * @fn static void _smart_cb_contextmenu_item_appended(void *data, Evas_Object *webview, void *arg)
- * @brief contextmenu,item,appended callback
+ * @fn void els_webview_contextmenu_item_appended(Elm_WebView_Editor* editor, Ewk_Context_Menu* menu)
+ * @brief Informs application that context menu should be deleted.
*
- * @param[in] data user data
- * @param[in] webview webview
- * @param[in] ev event info
+ * @param[in] editor an editor object.
*/
-static void
-_smart_cb_contextmenu_item_appended(void *data, Evas_Object *webview, void *arg)
+void
+els_webview_contextmenu_item_appended(Elm_WebView_Editor* editor, Ewk_Context_Menu* menu)
{
ELM_WEBVIEW_SLOGD("\n");
- Elm_WebView_Editor *editor = (Elm_WebView_Editor *)data;
- if (!editor) return;
-
- Ewk_Context_Menu *menu = (Ewk_Context_Menu *)arg;
- if (!menu) return;
+ if (!editor || !menu) return;
/* remove 'Select' and 'Select all' options from context menu when range selection is active (TWO_HANDLES mode) */
const Eina_List *item_list = ewk_context_menu_item_list_get(menu);
ewk_context_menu_item_enabled_set(last_item, EINA_FALSE);
}
+
+/* --------------------============================== INTERNAL ==============================-------------------- */
+
+/* mouse gesture callbacks */
+
/**
- * @fn static void _smart_cb_contextmenu_customize(void *data, Evas_Object *webview, void *arg)
- * @brief contextmenu,customize callback
+ * @fn static void _smart_cb_mouse_long_move_start(void *data, Evas_Object *webview, void *ev)
+ * @brief long,move,start callback
*
* @param[in] data user data
* @param[in] webview webview
* @param[in] ev event info
*/
static void
-_smart_cb_contextmenu_customize(void *data, Evas_Object *webview, void *arg)
+_smart_cb_mouse_long_move_start(void *data, Evas_Object *webview, void *ev)
{
ELM_WEBVIEW_SLOGD("\n");
+ Elm_WebView_Editor* editor = (Elm_WebView_Editor *)data;
+ if (!editor) return;
+
+ if (editor->text_selection_mode == TEXT_SELECTION_MODE_LARGE_HANDLE_POPUP)
+ _text_selection_mode_change(editor, TEXT_SELECTION_MODE_LARGE_HANDLE_MAGNIFIER);
}
/**
- * @fn static void _smart_cb_contextmenu_show(void *data, Evas_Object *webview, void *arg)
- * @brief contextmenu,show callback
+ * @fn static void _smart_cb_mouse_long_move(void *data, Evas_Object *webview, void *ev)
+ * @brief long,move callback
*
* @param[in] data user data
* @param[in] webview webview
* @param[in] ev event info
*/
static void
-_smart_cb_contextmenu_show(void *data, Evas_Object *webview, void *arg)
+_smart_cb_mouse_long_move(void *data, Evas_Object *webview, void *ev)
{
ELM_WEBVIEW_SLOGD("\n");
- Elm_WebView_Editor *editor = (Elm_WebView_Editor *)data;
+ Elm_WebView_Editor* editor = (Elm_WebView_Editor *)data;
if (!editor) return;
- Ewk_Context_Menu *menu = (Ewk_Context_Menu *)arg;
- if (!menu) return;
+ Evas_Point* point = (Evas_Point*)ev;
+ int x, y;
+ _coords_evas_to_ewk(webview, point->x, point->y, &x, &y);
- editor->contextmenu_data->webkit_context_menu = menu;
- _webview_contextmenu_show(editor);
+ if (editor->text_selection_mode == TEXT_SELECTION_MAGNIFIER)
+ {
+ Eina_Rectangle left_handle, right_handle;
+ Eina_Bool ret = ewk_frame_select_closest_word(ewk_view_frame_focused_get(editor->webview), x, y, &left_handle, &right_handle);
+ if (ret && !editor->magnifier.set_zoom)
+ {
+ editor->magnifier.zoom = (float)TEXT_SELECTION_MAGNIFIER_LINE_SIZE / (float)left_handle.h;
+ if (editor->magnifier.zoom < 1.0)
+ editor->magnifier.zoom = 1.0;
+ editor->magnifier.set_zoom = EINA_TRUE;
+ }
+ _magnifier_move(editor, point->x, point->y);
+ }
+ else if (editor->text_selection_mode == TEXT_SELECTION_MODE_LARGE_HANDLE_MAGNIFIER)
+ {
+ if (ewk_frame_caret_position_set(ewk_view_frame_focused_get(editor->webview), x, y))
+ _text_selection_large_handle_update_position(editor);
+
+ _magnifier_move(editor, point->x, point->y);
+ }
}
/**
- * @fn static void _smart_cb_contextmenu_free(void *data, Evas_Object *webview, void *arg)
- * @brief contextmenu,free callback
+ * @fn static void _smart_cb_mouse_long_move_end(void *data, Evas_Object *webview, void *ev)
+ * @brief long,move,end callback
*
* @param[in] data user data
* @param[in] webview webview
* @param[in] ev event info
*/
static void
-_smart_cb_contextmenu_free(void *data, Evas_Object *webview, void *arg)
+_smart_cb_mouse_long_move_end(void *data, Evas_Object *webview, void *ev)
{
ELM_WEBVIEW_SLOGD("\n");
Elm_WebView_Editor* editor = (Elm_WebView_Editor *)data;
if (!editor) return;
- _webview_contextmenu_del(editor);
+
+ Evas_Point* point = (Evas_Point*)ev;
+ editor->mouse_down.canvas.x = point->x;
+ editor->mouse_down.canvas.y = point->y;
+
+ if (editor->text_selection_mode == TEXT_SELECTION_MODE_LARGE_HANDLE_MAGNIFIER)
+ _text_selection_mode_change(editor, TEXT_SELECTION_MODE_LARGE_HANDLE_POPUP);
+ else if (editor->text_selection_mode == TEXT_SELECTION_MAGNIFIER)
+ {
+ int ewk_x, ewk_y;
+ _coords_evas_to_ewk(webview, point->x, point->y, &ewk_x, &ewk_y);
+ Ewk_Hit_Test *hit_test = ewk_frame_hit_test_new(ewk_view_frame_main_get(webview), ewk_x, ewk_y);
+ /* if during magnifier drag we stumble upon editable field we decide to do selection there but we have set proper selection mode */
+ if (hit_test->context & EWK_HIT_TEST_RESULT_CONTEXT_EDITABLE)
+ _text_selection_mode_change(editor, TEXT_SELECTION_MODE_INPUT_HANDLES_POPUP);
+ else
+ _text_selection_mode_change(editor, TEXT_SELECTION_MODE_HANDLES_POPUP);
+ ewk_frame_hit_test_free(hit_test);
+ }
+ else
+ _text_selection_mode_change(editor, TEXT_SELECTION_MODE_OFF);
}
-/* context menus handling functions */
+/* context menu and text selection caller callbacks */
/**
- * @fn static void _webview_contextmenu_show(Elm_Webview_Editor *editor)
- * @brief Prepares context menus to be shown by application.
+ * @fn static void _smart_cb_context_menu(void *data, Evas_Object *webview, void *ev)
+ * @brief context,menu callback
*
- * @param[in] editor an editor object.
+ * @param[in] data user data
+ * @param[in] webview webview
+ * @param[in] ev event info
*/
static void
-_webview_contextmenu_show(Elm_WebView_Editor *editor)
+_smart_cb_context_menu(void *data, Evas_Object *webview, void *ev)
{
ELM_WEBVIEW_SLOGD("\n");
- Evas_Object *webview = editor->webview;
- if (!webview) return;
-
- // set mouse_down_event as a position of front handle, large handle or a caret respectively
- editor->contextmenu_data->mouse_down_event = editor->mouse_down;
- if (editor->text_selection_mode & TEXT_SELECTION_TWO_HANDLES)
- {
- editor->contextmenu_data->mouse_down_event.canvas.x = editor->front_handle->handle_pos.x;
- editor->contextmenu_data->mouse_down_event.canvas.y = editor->front_handle->handle_pos.y;
- }
- else if (editor->text_selection_mode & TEXT_SELECTION_LARGE_HANDLE)
- {
- editor->contextmenu_data->mouse_down_event.canvas.x = editor->large_handle->handle_pos.x;
- editor->contextmenu_data->mouse_down_event.canvas.y = editor->large_handle->handle_pos.y;
- }
- else if ((editor->text_selection_mode & TEXT_SELECTION_INPUT)
- && !(editor->contextmenu_data->hit_test_result_context & EWK_HIT_TEST_RESULT_CONTEXT_IMAGE))
- {
- int x, y, w, h;
- if (ewk_frame_caret_position_get(ewk_view_frame_main_get(webview), &x, &y, &w, &h))
- {
- _coords_ewk_to_evas(webview, x, y, &x, &y);
- editor->contextmenu_data->mouse_down_event.canvas.x = x;
- editor->contextmenu_data->mouse_down_event.canvas.y = y + h;
- }
- }
- ELM_WEBVIEW_SLOGD("pos: x: %d y: %d\n", editor->contextmenu_data->mouse_down_event.canvas.x, editor->contextmenu_data->mouse_down_event.canvas.y);
- evas_object_smart_callback_call(webview, "webview,contextmenu,show", (void *) editor->contextmenu_data);
+ Elm_WebView_Editor* editor = (Elm_WebView_Editor *)data;
+ if (!editor) return;
+
+ editor->contextmenu_data->mouse_down_event = editor->mouse_down;
+ ewk_view_context_menu_forward_event(webview, &editor->mouse_down);
}
/**
- * @fn static void _webview_contextmenu_move(Elm_Webview_Editor *editor)
- * @brief Informs application that context menu should be moved.
+ * @fn static void _smart_cb_text_selection(void *data, Evas_Object *webview, void *ev)
+ * @brief text,selection callback
*
- * @param[in] editor an editor object.
+ * @param[in] data user data
+ * @param[in] webview webview
+ * @param[in] ev event info
*/
static void
-_webview_contextmenu_move(Elm_WebView_Editor *editor)
+_smart_cb_text_selection(void *data, Evas_Object *webview, void *ev)
{
ELM_WEBVIEW_SLOGD("\n");
- Evas_Object *webview = editor->webview;
- if (!webview) return;
+ Elm_WebView_Editor* editor = (Elm_WebView_Editor *)data;
+ if (!editor) return;
+ Evas_Point* point = (Evas_Point*)ev;
- Evas_Point new_pos;
- // set mouse_down_event as a position of front handle, large handle or a caret respectively otherwise last clicked position
- new_pos.x = editor->contextmenu_data->mouse_down_event.canvas.x;
- new_pos.y = editor->contextmenu_data->mouse_down_event.canvas.y;
- if (editor->text_selection_mode & TEXT_SELECTION_TWO_HANDLES)
- {
- new_pos.x = editor->front_handle->handle_pos.x;
- new_pos.y = editor->front_handle->handle_pos.y;
- }
- else if ((editor->text_selection_mode & TEXT_SELECTION_INPUT)
- &&!(editor->contextmenu_data->hit_test_result_context & EWK_HIT_TEST_RESULT_CONTEXT_IMAGE))
+ int ewk_x, ewk_y;
+ _coords_evas_to_ewk(webview, point->x, point->y, &ewk_x, &ewk_y);
+
+ Ewk_Hit_Test_Result_Context hit_test_context = editor->contextmenu_data->hit_test_result_context;
+ if (!((hit_test_context & EWK_HIT_TEST_RESULT_CONTEXT_LINK)
+ || (hit_test_context & EWK_HIT_TEST_RESULT_CONTEXT_MEDIA)))
{
- int x, y, w, h;
- if (ewk_frame_caret_position_get(ewk_view_frame_main_get(webview), &x, &y, &w, &h))
- {
- Eina_Rectangle view;
- evas_object_geometry_get(webview, &view.x, &view.y, &view.w, &view.h);
- _coords_ewk_to_evas(webview, x, y, &x, &y);
- if (x < view.x || x > (view.x + view.w) || y < (view.y - h) || y > (view.y + view.h))
- {
- /* if caret position is outside a viewport hide popup and large handle */
- _text_selection_mode_change(editor, TEXT_SELECTION_INPUT);
- return;
- }
- new_pos.x = x;
- new_pos.y = y + h;
- }
- else
- {
- ELM_WEBVIEW_SLOGD("No two handles, no large handle, no caret, clearing text selection");
- _text_selection_mode_change(editor, TEXT_SELECTION_MODE_OFF);
- }
+ if (hit_test_context & EWK_HIT_TEST_RESULT_CONTEXT_EDITABLE)
+ {
+ if (hit_test_context & EWK_HIT_TEST_RESULT_CONTEXT_IMAGE)
+ _text_selection_mode_change(editor, TEXT_SELECTION_MODE_INPUT_POPUP);
+ else
+ _text_selection_mode_change(editor, TEXT_SELECTION_MODE_LARGE_HANDLE_POPUP);
+ }
+ else if (hit_test_context & EWK_HIT_TEST_RESULT_CONTEXT_TEXT)
+ _text_selection_mode_change(editor, TEXT_SELECTION_MAGNIFIER);
}
- ELM_WEBVIEW_SLOGD("pos: x: %d y: %d\n", new_pos.x, new_pos.y);
- evas_object_smart_callback_call(webview, "webview,contextmenu,move", (void *) &new_pos);
}
+/* webkit editor client callbacks */
+
/**
- * @fn static void _webview_contextmenu_hide(Elm_Webview_Editor *editor)
- * @brief Informs application that context menu should be hidden.
+ * @fn static void _smart_cb_editorclient_selection_changed(void *data, Evas_Object *webview, void *arg)
+ * @brief editorclientselection,changed callback
*
- * @param[in] editor an editor object.
+ * @param[in] data user data
+ * @param[in] webview webview
+ * @param[in] ev event info
*/
static void
-_webview_contextmenu_hide(Elm_WebView_Editor *editor)
+_smart_cb_editorclient_selection_changed(void *data, Evas_Object *webview, void *arg)
{
ELM_WEBVIEW_SLOGD("\n");
- Evas_Object *webview = editor->webview;
- if (!webview) return;
- evas_object_smart_callback_call(webview, "webview,contextmenu,hide", NULL);
+ Elm_WebView_Editor* editor = (Elm_WebView_Editor *)data;
+ if (!editor) return;
+
+ switch (ewk_frame_text_selection_type_get(ewk_view_frame_focused_get(webview)))
+ {
+ case EWK_TEXT_SELECTION_NONE:
+ ELM_WEBVIEW_SLOGD("no selection - text_selection_mode %d\n", editor->text_selection_mode);
+ /* besides we receive 'no selection' we do not clear selection when magnifier is active */
+ if (!(editor->text_selection_mode & TEXT_SELECTION_MAGNIFIER))
+ _text_selection_mode_change(editor, TEXT_SELECTION_MODE_OFF);
+ break;
+
+ case EWK_TEXT_SELECTION_CARET:
+ ELM_WEBVIEW_SLOGD("caret selection - text_selection_mode %d\n", editor->text_selection_mode);
+ if (!(editor->text_selection_mode & TEXT_SELECTION_MAGNIFIER)) //if we are in magnifier mode then ignore this event
+ {
+ if (!(editor->text_selection_mode & TEXT_SELECTION_INPUT))
+ _text_selection_mode_change(editor, TEXT_SELECTION_MODE_OFF); //if we receive this event outside text input field then clear selection
+ if ((editor->text_selection_mode & TEXT_SELECTION_INPUT) && (editor->text_selection_mode & TEXT_SELECTION_MOUSE_DOWN))
+ _text_selection_mode_change(editor, TEXT_SELECTION_INPUT); //if during a text selection input selection was changed due click event remove MOUSE_DOWN
+ }
+ break;
+
+ case EWK_TEXT_SELECTION_RANGE:
+ ELM_WEBVIEW_SLOGD("range selection - text_selection_mode %d\n", editor->text_selection_mode);
+ break;
+ }
}
/**
- * @fn static void _webview_contextmenu_del(Elm_Webview_Editor *editor)
- * @brief Informs application that context menu should be deleted.
+ * @fn static void _smart_cb_editorclient_contents_changed(void *data, Evas_Object *webview, void *arg)
+ * @brief editorclientcontents,changed callback
*
- * @param[in] editor an editor object.
+ * @param[in] data user data
+ * @param[in] webview webview
+ * @param[in] ev event info
*/
static void
-_webview_contextmenu_del(Elm_WebView_Editor *editor)
+_smart_cb_editorclient_contents_changed(void *data, Evas_Object *webview, void *arg)
{
ELM_WEBVIEW_SLOGD("\n");
- Evas_Object *webview = editor->webview;
- if (!webview) return;
- evas_object_smart_callback_call(webview, "webview,contextmenu,del", NULL);
+
+ Elm_WebView_Editor* editor = (Elm_WebView_Editor *)data;
+ if (!editor) return;
+
+ _text_selection_mode_change(editor, TEXT_SELECTION_INPUT);
}
/* general text selection handles functions */
handle->handle_icon = edje_object_add(evas_object_evas_get(webview));
if (!handle->handle_icon) return EINA_FALSE;
if (!edje_object_file_set(handle->handle_icon, edj_file_path, handle_icon_edj_path)) return EINA_FALSE;
- edje_object_signal_emit(handle->handle_icon, "elm,action,focus", "elm");
+ edje_object_signal_emit(handle->handle_icon, "edje,focus,in", "edje");
edje_object_signal_emit(handle->handle_icon, "elm,state,bottom", "elm");
evas_object_data_set(handle->handle_icon, "editor", editor);
}
/**
- * @fn static void _text_selection_handle_mouse_up(void *data, Evas *e, Evas_Object *o, void *event_info)
+ * @fn static void _text_selection_handle_mouse_down(void *data, Evas *e, Evas_Object *o, void *event_info)
* @brief callback of mouse down text selection handle
*
* @param[in] data Text_Selection_Handle object.
_text_selection_large_handle_update_position(editor);
_text_selection_mode_change(editor, TEXT_SELECTION_MOUSE_DOWN);
}
+#if PARAGRAPH_SELECTION
+ else if (editor->text_selection_mode & TEXT_SELECTION_MODE_PARAGRAPH_POPUP)
+ {
+ _text_selection_mode_change(editor, TEXT_SELECTION_PARAGRAPH);
+ }
+#endif
+
+#if PARAGRAPH_SELECTION
+ if (handle == editor->paragraph_selection->top_handle)
+ {
+ editor->front_handle->is_handle_moving = EINA_TRUE;
+ editor->front_handle->handle_pos_clicked_diff = handle->handle_pos_clicked_diff;
+ }
+ else if (handle == editor->paragraph_selection->bottom_handle)
+ {
+ editor->back_handle->is_handle_moving = EINA_TRUE;
+ editor->back_handle->handle_pos_clicked_diff = handle->handle_pos_clicked_diff;
+ }
+ else if (handle == editor->paragraph_selection->left_handle)
+ {
+ editor->front_handle->is_handle_moving = EINA_TRUE;
+ editor->front_handle->handle_pos_clicked_diff = handle->handle_pos_clicked_diff;
+ }
+ else if (handle == editor->paragraph_selection->right_handle)
+ {
+ editor->back_handle->is_handle_moving = EINA_TRUE;
+ editor->back_handle->handle_pos_clicked_diff = handle->handle_pos_clicked_diff;
+ }
+#endif
}
/**
Elm_WebView_Editor* editor = (Elm_WebView_Editor *) evas_object_data_get(o, "editor");
if (!editor) return;
+#if PARAGRAPH_SELECTION
+ /* We need to "unpress" handlers in case of moving PS handlers */
+ if (editor->back_handle->is_handle_moving)
+ edje_object_signal_emit(editor->back_handle->handle_icon, "mouse,up,1", "handle");
+ else if (editor->front_handle->is_handle_moving)
+ edje_object_signal_emit(editor->front_handle->handle_icon, "mouse,up,1", "handle");
+
+ if (editor->paragraph_selection) /* Maybe some flag here will be better? */
+ {
+ if (handle == editor->paragraph_selection->top_handle)
+ editor->front_handle->is_handle_moving = EINA_FALSE;
+ else if (handle == editor->paragraph_selection->bottom_handle)
+ editor->back_handle->is_handle_moving = EINA_FALSE;
+ }
+#endif
+
if (editor->text_selection_mode == TEXT_SELECTION_MODE_HANDLES_MAGNIFIER)
_text_selection_mode_change(editor, TEXT_SELECTION_MODE_HANDLES_POPUP);
else if (editor->text_selection_mode == TEXT_SELECTION_MODE_INPUT_HANDLES_MAGNIFIER)
_text_selection_mode_change(editor, TEXT_SELECTION_MODE_LARGE_HANDLE_POPUP);
else if (editor->text_selection_mode & (TEXT_SELECTION_LARGE_HANDLE | TEXT_SELECTION_MOUSE_DOWN))
_text_selection_mode_change(editor, TEXT_SELECTION_MODE_INPUT_HANDLES_POPUP);
+#if PARAGRAPH_SELECTION
+ else if (editor->text_selection_mode & TEXT_SELECTION_PARAGRAPH)
+ {
+ _text_selection_mode_change(editor, TEXT_SELECTION_MODE_PARAGRAPH_POPUP);
+
+ editor->paragraph_selection->top_handle->is_handle_moving = EINA_FALSE;
+ editor->paragraph_selection->bottom_handle->is_handle_moving = EINA_FALSE;
+ editor->paragraph_selection->left_handle->is_handle_moving = EINA_FALSE;
+ editor->paragraph_selection->right_handle->is_handle_moving = EINA_FALSE;
+ editor->front_handle->is_handle_moving = EINA_FALSE;
+ editor->back_handle->is_handle_moving = EINA_FALSE;
+ }
+#endif
else
_text_selection_mode_change(editor, TEXT_SELECTION_MODE_OFF);
}
Evas_Object *webview = editor->webview;
if (!webview) return;
if (!(editor->text_selection_mode & TEXT_SELECTION_MAGNIFIER)
- && !(editor->text_selection_mode & TEXT_SELECTION_MOUSE_DOWN)) return;
+ && !(editor->text_selection_mode & TEXT_SELECTION_MOUSE_DOWN)
+#if PARAGRAPH_SELECTION
+ && !(editor->text_selection_mode & TEXT_SELECTION_PARAGRAPH)
+#endif
+ ) return;
int x, y;
x = ev->cur.canvas.x - handle->handle_pos_clicked_diff.x;
if (editor->front_handle->is_handle_moving)
{
+#if PARAGRAPH_SELECTION
+ if (editor->paragraph_selection->left_handle->is_handle_moving)
+ _coords_evas_to_ewk(webview, x, editor->front_handle->handle_pos.y, &ewkX, &ewkY);
+ if (editor->paragraph_selection->top_handle->is_handle_moving)
+ _coords_evas_to_ewk(webview, editor->front_handle->handle_pos.x, y, &ewkX, &ewkY);
+#endif
will_move = ewk_frame_selection_left_set(ewk_view_frame_focused_get(webview), ewkX, ewkY);
if (will_move)
{
}
else if (editor->back_handle->is_handle_moving)
{
+#if PARAGRAPH_SELECTION
+ if (editor->paragraph_selection->right_handle->is_handle_moving)
+ _coords_evas_to_ewk(webview, x, editor->back_handle->handle_pos.y, &ewkX, &ewkY);
+ if (editor->paragraph_selection->bottom_handle->is_handle_moving)
+ _coords_evas_to_ewk(webview, editor->back_handle->handle_pos.x, y, &ewkX, &ewkY);
+#endif
will_move = ewk_frame_selection_right_set(ewk_view_frame_focused_get(webview), ewkX, ewkY);
if (will_move)
{
_coords_ewk_to_evas(webview, rect.x, rect.y, &new_x, &new_y);
if (handle)
_text_selection_handle_move(handle, new_x, new_y);
- }
+#if PARAGRAPH_SELECTION
+ Eina_Rectangle rect1, rect2;
+ ewk_frame_selection_handlers_get(ewk_view_frame_focused_get(editor->webview), &rect1, &rect2);
+
+ if (!ewk_frame_points_in_same_paragraph_get(ewk_view_frame_main_get(webview), rect1.x, rect1.y, rect2.x, rect2.y))
+ {
+ if (!(editor->text_selection_mode & TEXT_SELECTION_PARAGRAPH))
+ {
+ _text_selection_mode_change(editor, TEXT_SELECTION_PARAGRAPH);
+ _paragraph_selection_show(editor->paragraph_selection);
+ _text_selection_handles_hide(editor);
+
+ /* Activate PS handlers */
+ if (editor->back_handle->is_handle_moving)
+ {
+ editor->paragraph_selection->bottom_handle->is_handle_moving = EINA_TRUE;
+ editor->paragraph_selection->bottom_handle->handle_pos_clicked_diff = editor->back_handle->handle_pos_clicked_diff;
+ }
+ else if (editor->front_handle->is_handle_moving)
+ {
+ editor->paragraph_selection->top_handle->is_handle_moving = EINA_TRUE;
+ editor->paragraph_selection->top_handle->handle_pos_clicked_diff = editor->front_handle->handle_pos_clicked_diff;
+ }
+ }
+ /* Check it! */
+ _paragraph_selection_update(editor->paragraph_selection, EINA_TRUE);
+ }
+ else
+ {
+ _text_selection_mode_change(editor, TEXT_SELECTION_MODE_HANDLES_MAGNIFIER);
+ _paragraph_selection_hide(editor->paragraph_selection);
+ _text_selection_handles_show(editor);
+
+ editor->paragraph_selection->top_handle->is_handle_moving = EINA_FALSE;
+ editor->paragraph_selection->bottom_handle->is_handle_moving = EINA_FALSE;
+
+ /* Press front/back handlers */
+ if (editor->back_handle->is_handle_moving)
+ edje_object_signal_emit(editor->back_handle->handle_icon, "mouse,down,1", "handle");
+ else if (editor->front_handle->is_handle_moving)
+ edje_object_signal_emit(editor->front_handle->handle_icon, "mouse,down,1", "handle");
+ }
+#endif
+ }
editor->webkit_text_selection_job = NULL;
}
_coords_ewk_to_evas(editor->webview, right_handle.x, right_handle.y, &right_handle.x, &right_handle.y);
_text_selection_handle_move(editor->front_handle, left_handle.x, left_handle.y);
_text_selection_handle_move(editor->back_handle, right_handle.x, right_handle.y);
- _text_selection_handles_show(editor);
+#if PARAGRAPH_SELECTION
+ if (!(editor->text_selection_mode & TEXT_SELECTION_PARAGRAPH))
+#endif
+ _text_selection_handles_show(editor);
editor->mouse_down.canvas.x = left_handle.x + 2; /* FIXME I know it is ugly, but it works - got to think about something better */
editor->mouse_down.canvas.y = left_handle.y - left_handle.h / 2;
editor->mouse_down.canvas.y = view.y;
else if (editor->mouse_down.canvas.y > (view.y + view.h))
editor->mouse_down.canvas.y = view.y + view.h - 1;
+#if PARAGRAPH_SELECTION
+ if (editor->text_selection_mode & TEXT_SELECTION_PARAGRAPH)
+ _paragraph_selection_update(editor->paragraph_selection, EINA_TRUE);
+#endif
return EINA_TRUE;
}
}
{
ELM_WEBVIEW_SLOGD("\n");
if (!editor) return;
+ if (!editor->magnifier.enable) return;
Evas_Object *webview = editor->webview;
if (!webview) return;
{
ELM_WEBVIEW_SLOGD("\n");
if (!editor) return;
-
if (!editor->magnifier.enable) return;
Evas_Object *webview = editor->webview;
{
ELM_WEBVIEW_SLOGD("\n");
if (!editor) return;
+ if (!editor->magnifier.enable) return;
if (editor->magnifier.cairo_content)
{
if (!editor) return;
ELM_WEBVIEW_SLOGD("copied item: %s\n", (const char *) arg);
- elm_cnp_selection_set(ELM_SEL_TYPE_CLIPBOARD, editor->widget, ELM_SEL_FORMAT_HTML, (const char *) arg, strlen((const char *) arg));
+ elm_cnp_selection_set(editor->widget, ELM_SEL_TYPE_CLIPBOARD, ELM_SEL_FORMAT_HTML, (const char *) arg, strlen((const char *) arg));
}
/**
Elm_WebView_Editor *editor = (Elm_WebView_Editor *)data;
if (!editor) return;
- elm_cnp_selection_set(ELM_SEL_TYPE_CLIPBOARD, editor->widget, ELM_SEL_FORMAT_MARKUP, (const char *) arg, strlen((const char *) arg));
+ elm_cnp_selection_set(editor->widget, ELM_SEL_TYPE_CLIPBOARD, ELM_SEL_FORMAT_IMAGE, (const char *) arg, strlen((const char *) arg));
}
/**
/* FIXME pasting images from clipboard does not work from elementary side */
/* Elementary returns ELM_SEL_FORMAT_MARKUP same in both text and image */
- if (data->len >= FILE_PROTOCOL_STR_LEN && !strncmp((const char *)data->data, "file:///", FILE_PROTOCOL_STR_LEN))
+ if (data->len >= strlen(FILE_PROTOCOL_STR) && !strncmp((const char *)data->data, FILE_PROTOCOL_STR, strlen(FILE_PROTOCOL_STR)))
{
/* In case of image */
/* perceives 'file:///' in page uri as a local html file. Email application is a well known case */
- if (!strncmp(ewk_view_uri_get(editor->webview), "file:///", FILE_PROTOCOL_STR_LEN))
+ if (!strncmp(ewk_view_uri_get(editor->webview), FILE_PROTOCOL_STR, strlen(FILE_PROTOCOL_STR)))
{
char *local_path = (char*)data->data;
- if (!strncmp(cb_type, PASTE_DATA_CB_STR, PASTE_DATA_CB_LEN))
- local_path += FILE_PROTOCOL_STR_LEN - 1;
- else if (!strncmp(cb_type, CBHM_PASTE_DATA_CB_STR, CBHM_PASTE_DATA_CB_LEN))
- local_path += FILE_PROTOCOL_STR_LEN;
+ if (!strncmp(cb_type, PASTE_DATA_CB_STR, strlen(PASTE_DATA_CB_STR)))
+ local_path += strlen(FILE_PROTOCOL_STR) - 1;
+ else if (!strncmp(cb_type, CBHM_PASTE_DATA_CB_STR, strlen(CBHM_PASTE_DATA_CB_STR)))
+ local_path += strlen(FILE_PROTOCOL_STR);
ELM_WEBVIEW_SLOGD("local html [%s]\n", local_path);
ewk_view_execute_editor_command(editor->webview, EWK_EDITOR_COMMAND_INSERT_HTML, (const char *)data->data);
}
- if (!strncmp(cb_type, PASTE_DATA_CB_STR, PASTE_DATA_CB_LEN))
+ if (!strncmp(cb_type, PASTE_DATA_CB_STR, strlen(PASTE_DATA_CB_STR)))
_text_selection_mode_change(editor, TEXT_SELECTION_INPUT);
- else if (!strncmp(cb_type, CBHM_PASTE_DATA_CB_STR, CBHM_PASTE_DATA_CB_LEN))
+ else if (!strncmp(cb_type, CBHM_PASTE_DATA_CB_STR, strlen(CBHM_PASTE_DATA_CB_STR)))
ecore_x_selection_secondary_set(elm_win_xwindow_get(editor->widget), "",1);
+
+ return EINA_TRUE;
}
/**
return ECORE_CALLBACK_PASS_ON;
if (cnpwidgetdata == editor->widget)
- elm_cnp_selection_get(ELM_SEL_TYPE_SECONDARY, (ELM_SEL_FORMAT_HTML | ELM_SEL_FORMAT_IMAGE), editor->widget, editor->cbhm_paste_function, (void*)editor);
+ elm_cnp_selection_get(editor->widget, ELM_SEL_TYPE_SECONDARY, (ELM_SEL_FORMAT_HTML | ELM_SEL_FORMAT_IMAGE), editor->cbhm_paste_function, (void*)editor);
return ECORE_CALLBACK_PASS_ON;
}
_text_selection_update(editor, TEXT_SELECTION_MODE_OFF);
break;
+#if PARAGRAPH_SELECTION
+ case TEXT_SELECTION_PARAGRAPH:
+ _text_selection_update(editor, TEXT_SELECTION_PARAGRAPH);
+ break;
+
+ case TEXT_SELECTION_MODE_PARAGRAPH_POPUP:
+ _paragraph_selection_calculate_popup_position(editor);
+ _text_selection_update(editor, TEXT_SELECTION_MODE_PARAGRAPH_POPUP);
+ break;
+#endif
+
case TEXT_SELECTION_MAGNIFIER:
if (!editor->text_selection_mode == TEXT_SELECTION_MODE_OFF)
_text_selection_off(editor);
case TEXT_SELECTION_MODE_HANDLES_MAGNIFIER:
if (editor->text_selection_mode == TEXT_SELECTION_MODE_HANDLES_POPUP)
_text_selection_update(editor, TEXT_SELECTION_MODE_HANDLES_MAGNIFIER);
+
+#if PARAGRAPH_SELECTION
+ if (editor->text_selection_mode == TEXT_SELECTION_PARAGRAPH)
+ _text_selection_update(editor, TEXT_SELECTION_MODE_HANDLES_MAGNIFIER);
+#endif
break;
case TEXT_SELECTION_MODE_HANDLES_POPUP:
case TEXT_SELECTION_ZOOM_START:
if (editor->text_selection_mode & TEXT_SELECTION_POPUP)
- _webview_contextmenu_hide(editor);
+ els_webview_contextmenu_hide(editor);
if (editor->text_selection_mode & TEXT_SELECTION_LARGE_HANDLE)
_text_selection_large_handle_hide(editor);
if (editor->text_selection_mode & TEXT_SELECTION_TWO_HANDLES)
_text_selection_handles_hide(editor);
+#if PARAGRAPH_SELECTION
+ if (editor->text_selection_mode & TEXT_SELECTION_PARAGRAPH)
+ _paragraph_selection_hide(editor->paragraph_selection);
+#endif
editor->magnifier.set_zoom = EINA_FALSE;
editor->text_selection_mode |= TEXT_SELECTION_ZOOM_START;
break;
_text_selection_handles_update_position(editor);
if (editor->text_selection_mode & TEXT_SELECTION_POPUP)
- _webview_contextmenu_move(editor);
+ els_webview_contextmenu_move(editor);
+
+#if PARAGRAPH_SELECTION
+ if (editor->text_selection_mode & TEXT_SELECTION_PARAGRAPH)
+ {
+ _paragraph_selection_update(editor->paragraph_selection, EINA_TRUE);
+ _paragraph_selection_show(editor->paragraph_selection);
+ }
+#endif
editor->text_selection_mode &= TEXT_SELECTION_ZOOM_END;
}
case TEXT_SELECTION_MOUSE_DOWN:
if (editor->text_selection_mode & TEXT_SELECTION_LARGE_HANDLE)
- _webview_contextmenu_del(editor);
+ els_webview_contextmenu_del(editor);
editor->text_selection_mode |= TEXT_SELECTION_MOUSE_DOWN;
break;
case TEXT_SELECTION_PAN_START:
if (editor->text_selection_mode & TEXT_SELECTION_POPUP)
- _webview_contextmenu_hide(editor);
+ els_webview_contextmenu_hide(editor);
editor->text_selection_mode |= TEXT_SELECTION_PAN_START;
break;
if (editor->text_selection_mode & TEXT_SELECTION_PAN_START)
{
if (editor->text_selection_mode & TEXT_SELECTION_POPUP)
- _webview_contextmenu_move(editor);
+ els_webview_contextmenu_move(editor);
editor->text_selection_mode &= TEXT_SELECTION_PAN_END;
}
break;
}
/* we hide context popup if new mode is not TEXT_SELECTION_POPUP and popup was present in an old one */
else if (old_mode & TEXT_SELECTION_POPUP)
- _webview_contextmenu_del(editor);
+ els_webview_contextmenu_del(editor);
if ((old_mode & TEXT_SELECTION_TWO_HANDLES) != (new_mode & TEXT_SELECTION_TWO_HANDLES))
{
if (new_mode & TEXT_SELECTION_TWO_HANDLES)
else
_text_selection_large_handle_hide(editor);
}
-
+#if PARAGRAPH_SELECTION
+ if ((old_mode & TEXT_SELECTION_PARAGRAPH) && (new_mode == TEXT_SELECTION_MODE_OFF))
+ _paragraph_selection_hide(editor->paragraph_selection);
+#endif
if (new_mode == TEXT_SELECTION_MODE_OFF)
ewk_view_execute_editor_command(editor->webview, EWK_EDITOR_COMMAND_SELECT_NONE, NULL);
}
ELM_WEBVIEW_SLOGD("\n");
if (!editor) return;
- _webview_contextmenu_del(editor);
+ els_webview_contextmenu_del(editor);
if (editor->magnifier.popup)
{
_text_selection_handles_hide(editor);
_text_selection_large_handle_hide(editor);
ewk_view_execute_editor_command(editor->webview, EWK_EDITOR_COMMAND_SELECT_NONE, NULL);
-
+#if PARAGRAPH_SELECTION
+ _paragraph_selection_hide(editor->paragraph_selection);
+#endif
_magnifier_hide(editor);
}
*ux = x - scrollX + viewX;
*uy = y - scrollY + viewY;
}
+
+#if PARAGRAPH_SELECTION
+
+/**
+ * paragraph selection functions
+ */
+static Paragraph_Selection*
+_paragraph_selection_init(Elm_WebView_Editor* sd, const char* selection_edje_path, const char* selection_group)
+{
+ ELM_WEBVIEW_SLOGD("\n");
+ if (!sd) return NULL;
+
+ Evas_Object *webview = sd->webview;
+ if (!webview) return NULL;
+
+ Paragraph_Selection* paragraph_selection = (Paragraph_Selection*) calloc(sizeof(Paragraph_Selection), 1);
+ if (!paragraph_selection) return NULL;
+
+ /* Add selection rectangle. */
+ paragraph_selection->rect= edje_object_add(evas_object_evas_get(webview));
+ if (!paragraph_selection->rect)
+ {
+ _paragraph_selection_destroy(¶graph_selection);
+ return NULL;
+ }
+ if (!edje_object_file_set(paragraph_selection->rect, selection_edje_path, selection_group))
+ {
+ _paragraph_selection_destroy(¶graph_selection);
+ return NULL;
+ }
+
+ paragraph_selection->is_shown = EINA_FALSE;
+ paragraph_selection->editor = sd;
+
+ paragraph_selection->top_handle = (Text_Selection_Handle*) malloc(sizeof(Text_Selection_Handle));
+ paragraph_selection->bottom_handle = (Text_Selection_Handle*) malloc(sizeof(Text_Selection_Handle));
+ paragraph_selection->left_handle = (Text_Selection_Handle*) malloc(sizeof(Text_Selection_Handle));
+ paragraph_selection->right_handle = (Text_Selection_Handle*) malloc(sizeof(Text_Selection_Handle));
+
+ Eina_Bool handles_initialized = EINA_FALSE;
+ if (paragraph_selection->top_handle && paragraph_selection->bottom_handle && paragraph_selection->left_handle && paragraph_selection->right_handle)
+ {
+ if (_text_selection_handle_init(sd, paragraph_selection->top_handle, TIZEN_THEME_EDJ, PARAGRAPH_HANDLE_ICON_EDJ_PATH))
+ if (_text_selection_handle_init(sd, paragraph_selection->bottom_handle, TIZEN_THEME_EDJ, PARAGRAPH_HANDLE_ICON_EDJ_PATH))
+ if (_text_selection_handle_init(sd, paragraph_selection->left_handle, TIZEN_THEME_EDJ, PARAGRAPH_HANDLE_ICON_EDJ_PATH))
+ if (_text_selection_handle_init(sd, paragraph_selection->right_handle, TIZEN_THEME_EDJ, PARAGRAPH_HANDLE_ICON_EDJ_PATH))
+ handles_initialized = EINA_TRUE;
+ }
+
+ if (!handles_initialized)
+ {
+ ELM_WEBVIEW_SLOGE("Paragraph selection handles not initialized.\n");
+ _paragraph_selection_destroy(¶graph_selection);
+ return NULL;
+ }
+
+ evas_object_smart_member_add(paragraph_selection->rect, webview);
+ evas_object_propagate_events_set(paragraph_selection->rect, EINA_FALSE);
+ return paragraph_selection;
+}
+
+static void
+_paragraph_selection_move(Paragraph_Selection* paragraph_selection, int x, int y)
+{
+ ELM_WEBVIEW_SLOGD("\n");
+ if (!paragraph_selection) return;
+
+ evas_object_move(paragraph_selection->rect, x, y);
+}
+
+static void
+_paragraph_selection_resize(Paragraph_Selection* paragraph_selection, int w, int h)
+{
+ ELM_WEBVIEW_SLOGD("\n");
+ if (!paragraph_selection) return;
+
+ evas_object_resize(paragraph_selection->rect, w, h);
+}
+
+static void
+_paragraph_selection_show(Paragraph_Selection* paragraph_selection)
+{
+ ELM_WEBVIEW_SLOGD("\n");
+ if (!paragraph_selection || !paragraph_selection->editor || !paragraph_selection->editor->webview) return;
+ if (paragraph_selection->is_shown) return;
+
+ evas_object_show(paragraph_selection->rect);
+ evas_object_show(paragraph_selection->top_handle->handle_icon);
+ evas_object_show(paragraph_selection->bottom_handle->handle_icon);
+ evas_object_show(paragraph_selection->left_handle->handle_icon);
+ evas_object_show(paragraph_selection->right_handle->handle_icon);
+ paragraph_selection->is_shown = EINA_TRUE;
+ ewk_view_selection_visibility_set(paragraph_selection->editor->webview, EINA_FALSE);
+}
+
+static void
+_paragraph_selection_hide(Paragraph_Selection* paragraph_selection)
+{
+ ELM_WEBVIEW_SLOGD("\n");
+ if (!paragraph_selection) return;
+ if (!paragraph_selection->is_shown) return;
+ evas_object_hide(paragraph_selection->rect);
+ evas_object_hide(paragraph_selection->top_handle->handle_icon);
+ evas_object_hide(paragraph_selection->bottom_handle->handle_icon);
+ evas_object_hide(paragraph_selection->left_handle->handle_icon);
+ evas_object_hide(paragraph_selection->right_handle->handle_icon);
+ paragraph_selection->is_shown = EINA_FALSE;
+ ewk_view_selection_visibility_set(paragraph_selection->editor->webview, EINA_TRUE);
+}
+
+static void
+_paragraph_selection_destroy(Paragraph_Selection** paragraph_selection)
+{
+ ELM_WEBVIEW_SLOGD("\n");
+ if (!*paragraph_selection) return;
+ _paragraph_selection_hide(*paragraph_selection);
+ evas_object_del( (*paragraph_selection)->rect);
+
+ free((*paragraph_selection)->top_handle);
+ free((*paragraph_selection)->bottom_handle);
+ free((*paragraph_selection)->left_handle);
+ free((*paragraph_selection)->right_handle);
+
+ free(*paragraph_selection);
+ *paragraph_selection = NULL;
+}
+
+static void
+_paragraph_selection_update(Paragraph_Selection* paragraph_selection, Eina_Bool calculate_webkit_selection)
+{
+ ELM_WEBVIEW_SLOGD("\n");
+
+ if (!paragraph_selection) return;
+ Evas_Object* webkit_frame = ewk_view_frame_main_get(paragraph_selection->editor->webview);
+
+ Eina_Rectangle ewk_handler1, ewk_handler2, ewk_par_all, elm_par_all, rect1, rect2;
+
+ Eina_Bool is_selection = ewk_frame_selection_handlers_get(webkit_frame, &ewk_handler1, &ewk_handler2);
+ if (!is_selection)
+ return;
+
+ if (!(paragraph_selection->editor->text_selection_mode & TEXT_SELECTION_PAN_START)) /* ZOOM_START - it must be checked whether it's also needed */
+ {
+ /* Set selection on the begin/end of paragraphs */
+ ewk_frame_paragraph_rect_get(webkit_frame, ewk_handler1.x, ewk_handler1.y, &rect1);
+ ewk_frame_paragraph_rect_get(webkit_frame, ewk_handler2.x, ewk_handler2.y, &rect2);
+ if (calculate_webkit_selection)
+ {
+ ewk_frame_selection_left_set(webkit_frame, rect1.x, rect1.y);
+ ewk_frame_selection_right_set(webkit_frame, rect2.x + rect2.w, rect2.y + rect2.h);
+ }
+ }
+
+ /* Get rectangle to be selected by paragraph selection */
+ ewk_frame_paragraph_selection_rect_get(webkit_frame, &ewk_par_all);
+
+ /* Set WebKit selection */
+ if (!(paragraph_selection->editor->text_selection_mode & TEXT_SELECTION_PAN_START) && calculate_webkit_selection)
+ {
+ ewk_frame_selection_left_set(webkit_frame, ewk_par_all.x, ewk_par_all.y);
+ ewk_frame_selection_right_set(webkit_frame, ewk_par_all.x + ewk_par_all.w, ewk_par_all.y + ewk_par_all.h);
+ }
+
+ /* Set paragraph selection */
+ elm_par_all = ewk_par_all;
+ _coords_ewk_to_evas(paragraph_selection->editor->webview, ewk_par_all.x, ewk_par_all.y, &elm_par_all.x, &elm_par_all.y);
+ _paragraph_selection_move(paragraph_selection, elm_par_all.x, elm_par_all.y);
+ _paragraph_selection_resize(paragraph_selection, elm_par_all.w, elm_par_all.h);
+
+ /* Move handlers: front and back */
+ _text_selection_handle_move(paragraph_selection->editor->front_handle, elm_par_all.x, elm_par_all.y);
+ _text_selection_handle_move(paragraph_selection->editor->back_handle, elm_par_all.x + elm_par_all.w, elm_par_all.y + elm_par_all.h);
+
+ /* Move handlers: top and bottom */
+ _text_selection_handle_move(paragraph_selection->top_handle, elm_par_all.x + elm_par_all.w/2, elm_par_all.y);
+ _text_selection_handle_move(paragraph_selection->bottom_handle, elm_par_all.x + elm_par_all.w/2, elm_par_all.y + elm_par_all.h);
+ _text_selection_handle_move(paragraph_selection->left_handle, elm_par_all.x, elm_par_all.y + elm_par_all.h/2);
+ _text_selection_handle_move(paragraph_selection->right_handle, elm_par_all.x + elm_par_all.w, elm_par_all.y + elm_par_all.h/2);
+}
+
+static Eina_Bool
+_is_point_visible(int x, int y, int viewX, int viewY, int viewW, int viewH)
+{
+ if ((viewX <= x) && (x <= viewX + viewW) && (viewY <= y) && (y <= viewY + viewH))
+ return EINA_TRUE;
+ else
+ return EINA_FALSE;
+}
+
+static void
+_paragraph_selection_calculate_popup_position(Elm_WebView_Editor* editor)
+{
+ ELM_WEBVIEW_SLOGD("\n");
+
+ if (!editor) return;
+
+ int viewX, viewY, viewW, viewH;
+ evas_object_geometry_get(editor->webview, &viewX, &viewY, &viewW, &viewH);
+
+ Text_Selection_Handle *handle_with_menu = NULL;
+ if (_is_point_visible(editor->paragraph_selection->top_handle->handle_pos.x, editor->paragraph_selection->top_handle->handle_pos.y, viewX, viewY, viewW, viewH))
+ handle_with_menu = editor->paragraph_selection->top_handle;
+ else if (_is_point_visible(editor->paragraph_selection->bottom_handle->handle_pos.x, editor->paragraph_selection->bottom_handle->handle_pos.y, viewX, viewY, viewW, viewH))
+ handle_with_menu = editor->paragraph_selection->bottom_handle;
+ else if (_is_point_visible(editor->paragraph_selection->top_handle->handle_pos.x, editor->paragraph_selection->left_handle->handle_pos.y, viewX, viewY, viewW, viewH))
+ handle_with_menu = editor->paragraph_selection->left_handle;
+ else if (_is_point_visible(editor->paragraph_selection->right_handle->handle_pos.x, editor->paragraph_selection->right_handle->handle_pos.y, viewX, viewY, viewW, viewH))
+ handle_with_menu = editor->paragraph_selection->right_handle;
+
+ if (handle_with_menu)
+ {
+ editor->contextmenu_data->mouse_down_event.canvas.x = handle_with_menu->handle_pos.x;
+ editor->contextmenu_data->mouse_down_event.canvas.y = handle_with_menu->handle_pos.y;
+ }
+ else
+ {
+ editor->contextmenu_data->mouse_down_event.canvas.x = 0;
+ editor->contextmenu_data->mouse_down_event.canvas.y = 0;
+ }
+ editor->mouse_down.canvas.x = editor->contextmenu_data->mouse_down_event.canvas.x;
+ editor->mouse_down.canvas.y = editor->contextmenu_data->mouse_down_event.canvas.y;
+}
+
+#endif // PARAGRAPH_SELECTION
+
TEXT_SELECTION_ZOOM_END = ~TEXT_SELECTION_ZOOM_START, //-129
TEXT_SELECTION_PAN_START = 1 << 8, // 256
TEXT_SELECTION_PAN_END = ~TEXT_SELECTION_PAN_START, //-257
+ TEXT_SELECTION_PARAGRAPH = 1 << 9, // 512
TEXT_SELECTION_MODE_HANDLES_MAGNIFIER = TEXT_SELECTION_MAGNIFIER | TEXT_SELECTION_TWO_HANDLES, // 20
TEXT_SELECTION_MODE_HANDLES_POPUP = TEXT_SELECTION_TWO_HANDLES | TEXT_SELECTION_POPUP, // 24
TEXT_SELECTION_MODE_INPUT_POPUP = TEXT_SELECTION_INPUT | TEXT_SELECTION_POPUP, // 10
TEXT_SELECTION_MODE_INPUT_HANDLES_POPUP = TEXT_SELECTION_INPUT | TEXT_SELECTION_POPUP | TEXT_SELECTION_TWO_HANDLES, // 26
TEXT_SELECTION_MODE_LARGE_HANDLE_MAGNIFIER = TEXT_SELECTION_INPUT | TEXT_SELECTION_MAGNIFIER | TEXT_SELECTION_LARGE_HANDLE, // 38
TEXT_SELECTION_MODE_LARGE_HANDLE_POPUP = TEXT_SELECTION_INPUT | TEXT_SELECTION_POPUP | TEXT_SELECTION_LARGE_HANDLE, // 42
+ TEXT_SELECTION_MODE_PARAGRAPH_POPUP = TEXT_SELECTION_PARAGRAPH | TEXT_SELECTION_POPUP, // 520
} Text_Selection_Mode;
typedef struct _Elm_WebView_Editor Elm_WebView_Editor;
+typedef struct _Paragraph_Selection Paragraph_Selection;
Elm_WebView_Editor* els_webview_editor_init(Evas_Object* webview);
void els_webview_editor_destroy(Elm_WebView_Editor* editor);
Eina_Bool els_webview_editor_show_magnifier_get(Elm_WebView_Editor* editor);
void els_webview_editor_show_magnifier_set(Elm_WebView_Editor* editor, Eina_Bool enable);
+/* context menus handling functions */
+void els_webview_contextmenu_new(Elm_WebView_Editor* editor);
+void els_webview_contextmenu_show(Elm_WebView_Editor* editor, Ewk_Context_Menu* menu);
+void els_webview_contextmenu_move(Elm_WebView_Editor* editor);
+void els_webview_contextmenu_hide(Elm_WebView_Editor* editor);
+void els_webview_contextmenu_del(Elm_WebView_Editor* editor);
+void els_webview_contextmenu_item_appended(Elm_WebView_Editor* editor, Ewk_Context_Menu* menu);
+
#endif /*#ifndef els_webview_editor_h */
--- /dev/null
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * All rights reserved.
+ */
+
+collections {
+ group { // defines a layout for paragraph selection
+ name: "elm-webview/paragraph";
+ parts {
+ part {
+ name: "selection_rect";
+ mouse_events: 0;
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ visible: 1;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 1.0; }
+ color: 125 175 225 102;
+ }
+ }
+ part {
+ name: "border_left";
+ mouse_events: 0;
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ visible: 1;
+ min: 3 3;
+ rel1 { relative: 0.0 0.0; offset: 0 0;}
+ rel2 { relative: 0.0 1.0; offset: 0 0;}
+ color: 0 0 100 200;
+ }
+ }
+ part {
+ name: "border_right";
+ mouse_events: 0;
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ visible: 1;
+ min: 3 3;
+ rel1 { relative: 1.0 0.0; offset: 0 0;}
+ rel2 { relative: 1.0 1.0; offset: 0 0;}
+ color: 0 0 100 200;
+ }
+ }
+ part {
+ name: "border_up";
+ mouse_events: 0;
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ visible: 1;
+ min: 3 3;
+ rel1 { relative: 0.0 0.0; offset: 0 0;}
+ rel2 { relative: 1.0 0.0; offset: 0 0;}
+ color: 0 0 100 200;
+ }
+ }
+ part {
+ name: "border_down";
+ mouse_events: 0;
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ visible: 1;
+ min: 3 3;
+ rel1 { relative: 0.0 1.0; offset: 0 0;}
+ rel2 { relative: 1.0 1.0; offset: 0 0;}
+ color: 0 0 100 200;
+ }
+ }
+ }
+}
#include <dlog.h>
+/* Display Console message from WebKit */
+#define CONSOLE_MESSAGE_SLOGI(fmt, args...) ((void)SLOG(LOG_INFO, "ConsoleMessage", fmt, ##args))
+
#define ELM_WEBVIEW_SLOGD(fmt, args...) SLOGD("[%s: %s: %d] "fmt, (rindex(__FILE__, '/') ? rindex(__FILE__, '/') + 1 : __FILE__), __FUNCTION__, __LINE__, ##args)
#define ELM_WEBVIEW_SLOGI(fmt, args...) SLOGI("[%s: %s: %d] "fmt, (rindex(__FILE__, '/') ? rindex(__FILE__, '/') + 1 : __FILE__), __FUNCTION__, __LINE__, ##args)
#define ELM_WEBVIEW_SLOGW(fmt, args...) SLOGW("[%s: %s: %d] "fmt, (rindex(__FILE__, '/') ? rindex(__FILE__, '/') + 1 : __FILE__), __FUNCTION__, __LINE__, ##args)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/modal_utility/modal_launcher)
#----------------------------------------------------
+# set pkg-config modules
+#----------------------------------------------------
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED
+ glib-2.0)
+FOREACH(flag ${pkgs_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+#----------------------------------------------------
# make
#----------------------------------------------------
ADD_EXECUTABLE(${MODAL_LAUNCHER} ${MODAL_LAUNCHER_SRCS})
#include "modal_launcher.h"
-#include <appcore-efl.h>
#include <Ecore_X.h>
+#include <appcore-efl.h>
+#include <glib.h>
#include <utilX.h>
#include "popup.h"
#include "log.h"
+
+char* decode_base_64(const char* decoded_message)
+{
+ ELM_WEBVIEW_SLOGD("decode_base_64", decoded_message);
+
+ int len = 0;
+ unsigned char *out = NULL;
+
+ out = (unsigned char *)g_base64_decode((gchar *)decoded_message, &len);
+ ELM_WEBVIEW_SLOGD("out[%s]", out);
+
+ return out;
+}
+
static Eina_Bool keydown_event(void *data, int type, void *event)
{
Ecore_Event_Key *ev = (Ecore_Event_Key *)event;
struct appdata *ad = data;
const char* type = 0;
+ const char* decoded_message = NULL;
+ const char* message = NULL;
type = bundle_get_val(b, "type");
if (!strncmp(type, "confirm", strlen("confirm"))) {
- const char* msg = bundle_get_val(b, "message");
- _confirm(ad, msg);
+ message = bundle_get_val(b, "message");
+ decoded_message = decode_base_64(message);
+ _confirm(ad, decoded_message);
} else if (!strncmp(type, "alert", strlen("alert"))) {
- const char* msg = bundle_get_val(b, "message");
- _alert(ad, msg);
+ message = bundle_get_val(b, "message");
+ decoded_message = decode_base_64(message);
+ _alert(ad, decoded_message);
} else if (!strncmp(type, "prompt", strlen("prompt"))) {
- const char* msg = bundle_get_val(b, "message");
+ message = bundle_get_val(b, "message");
+ decoded_message = decode_base_64(message);
const char* value = bundle_get_val(b, "value");
- _prompt(ad, msg, value);
+ const char* decoded_value = decode_base_64(value);
+ _prompt(ad, decoded_message, decoded_value);
+ if(decoded_value) g_free(decoded_value);
+ decoded_value = NULL;
} else if (!strncmp(type, "file", strlen("file"))) {
const char* multiple = bundle_get_val(b, "multiple");
const char* accpet = bundle_get_val(b, "accept");
} else if (!strncmp(type, "authentication", strlen("authentication"))) {
const char* realm = bundle_get_val(b, "realm");
const char* host = bundle_get_val(b, "host");
- _authentication(ad, realm, host);
+ const char* decoded_realm = decode_base_64(realm);
+ _authentication(ad, decoded_realm, host);
+ if (decoded_realm) g_free(decoded_realm);
+ decoded_realm = NULL;
} else {
elm_exit();
return 0;
if (ad->win)
elm_win_activate(ad->win);
+ if (decoded_message) g_free(decoded_message);
+ decoded_message = NULL;
+
return 0;
}
{
/* Pipe will read below message and decide what user did. */
printf(RESULT_KEYWORD "\n");
- if ((int)event_info != 5)
- evas_object_del(obj);
+ // if ((int)event_info !=5) //what does it mean?
+ evas_object_del(obj);
elm_exit();
}
*/
void _alert(struct appdata *ad, const char *message)
{
- Evas_Object *popup;
+ Evas_Object *popup, *btn;
popup = elm_popup_add(ad->win);
- elm_popup_desc_set(popup, message);
- elm_popup_buttons_add(popup, 1, "Ok", ELM_POPUP_RESPONSE_OK, NULL);
+ elm_object_text_set(popup, message);
+
+ btn = elm_button_add(popup);
+ elm_object_text_set(btn, dgettext("sys_string", "IDS_COM_SK_OK"));
+ elm_object_part_content_set(popup, "button1", btn);
+ evas_object_smart_callback_add(btn, "clicked", response_alert_cb, NULL);
+ evas_object_show(btn);
- evas_object_smart_callback_add(popup, "response", response_alert_cb, NULL);
evas_object_show(popup);
}
* @fn static void response_confirm_cb( void *data, Evas_Object *obj, void *event_info)
* @brief receive events when user clicked button of confirm dialog.
*/
-static void response_confirm_cb( void *data, Evas_Object *obj, void *event_info)
+static void response_confirm_ok_cb( void *data, Evas_Object *obj, void *event_info)
+{
+ /* Pipe will read below message and decide what user did. */
+ printf(RESULT_KEYWORD "\n");
+ // if ((int)event_info !=5) //what does it mean?
+ evas_object_del(obj);
+ elm_exit();
+}
+
+/**
+ * @fn static void response_confirm_cb( void *data, Evas_Object *obj, void *event_info)
+ * @brief receive events when user clicked button of confirm dialog.
+ */
+static void response_confirm_cancel_cb( void *data, Evas_Object *obj, void *event_info)
{
/* Pipe will read below message and decide what user did. */
- if ((int)event_info == ELM_POPUP_RESPONSE_OK)
- printf(RESULT_KEYWORD "\n");
- if ((int)event_info != 5)
- evas_object_del(obj);
+ // if ((int)event_info !=5) //what does it mean?
+ evas_object_del(obj);
elm_exit();
}
*/
void _confirm(struct appdata *ad, const char *message)
{
- Evas_Object *popup;
+ Evas_Object *popup, *btn;
popup = elm_popup_add(ad->win);
- elm_popup_desc_set(popup, message);
- elm_popup_buttons_add(popup, 2, "Ok", ELM_POPUP_RESPONSE_OK, "Cancel", ELM_POPUP_RESPONSE_CANCEL, NULL);
+ elm_object_text_set(popup, message);
+
+ btn = elm_button_add(popup);
+ elm_object_text_set(btn, dgettext("sys_string", "IDS_COM_SK_OK"));
+ elm_object_part_content_set(popup, "button1", btn);
+ evas_object_smart_callback_add(btn, "clicked", response_confirm_ok_cb, NULL);
+ evas_object_show(btn);
+
+ btn = elm_button_add(popup);
+ elm_object_text_set(btn, dgettext("sys_string", "IDS_COM_SK_CANCEL"));
+ elm_object_part_content_set(popup, "button2", btn);
+ evas_object_smart_callback_add(btn, "clicked", response_confirm_cancel_cb, NULL);
+ evas_object_show(btn);
- evas_object_smart_callback_add(popup, "response", response_confirm_cb, NULL);
evas_object_show(popup);
}
* @fn static void response_prompt_cb( void *data, Evas_Object *obj, void *event_info)
* @brief receive events when user clicked button of promptdialog.
*/
-static void response_prompt_cb(void *data, Evas_Object *obj, void *event_info)
+static void response_prompt_ok_cb(void *data, Evas_Object *obj, void *event_info)
{
/* Pipe will read below message and decide what user did. */
Evas_Object *entry = (Evas_Object*)data;
- if ((int)event_info == ELM_POPUP_RESPONSE_OK)
- printf(RESULT_KEYWORD "%s\n", elm_entry_entry_get(entry));
+ printf(RESULT_KEYWORD "%s\n", elm_entry_entry_get(entry));
+ elm_exit();
+}
+/**
+ * @fn static void response_prompt_cb( void *data, Evas_Object *obj, void *event_info)
+ * @brief receive events when user clicked button of promptdialog.
+ */
+static void response_prompt_cancel_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ /* Pipe will read below message and decide what user did. */
elm_exit();
}
{
if (value == ECORE_IMF_INPUT_PANEL_STATE_HIDE) {
Evas_Object *o = (Evas_Object *)data;
- elm_object_unfocus(o);
+ elm_object_focus_set(o, EINA_FALSE);
}
}
*/
void _prompt(struct appdata *ad, const char *message, const char *defaultValue)
{
- Evas_Object *popup;
+ Evas_Object *popup, *btn;
popup = elm_popup_add(ad->win);
elm_popup_orient_set(popup, ELM_POPUP_ORIENT_CENTER);
- elm_popup_buttons_add(popup, 2, "Ok", ELM_POPUP_RESPONSE_OK, "Cancel", ELM_POPUP_RESPONSE_CANCEL, NULL);
Evas_Object* content = elm_box_add(popup);
evas_object_size_hint_weight_set(content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_box_pack_end(content, entry);
evas_object_show(entry);
- elm_popup_content_set(popup, content);
- evas_object_smart_callback_add(popup, "response", response_prompt_cb, entry);
+ btn = elm_button_add(content);
+ elm_object_text_set(btn, dgettext("sys_string", "IDS_COM_SK_OK"));
+ elm_object_part_content_set(content, "button1", btn);
+ evas_object_smart_callback_add(btn, "clicked", response_prompt_ok_cb, entry);
+ evas_object_show(btn);
+
+ btn = elm_button_add(content);
+ elm_object_text_set(btn, dgettext("sys_string", "IDS_COM_SK_CANCEL"));
+ elm_object_part_content_set(content, "button2", btn);
+ evas_object_smart_callback_add(btn, "clicked", response_prompt_cancel_cb, entry);
+ evas_object_show(btn);
+
+ elm_object_content_set(popup, content);
evas_object_show(popup);
}
bundle_free(b);
}
-static void response_cert_cb( void *data, Evas_Object *obj, void *event_info)
+static void response_cert_ok_cb( void *data, Evas_Object *obj, void *event_info)
{
//Pipe will read below message and decide what user did.
- if ((int)event_info == ELM_POPUP_RESPONSE_OK)
- printf(RESULT_KEYWORD "\n");
- if ((int)event_info != 5)
- evas_object_del(obj);
+ printf(RESULT_KEYWORD "\n");
+ // if ((int)event_info != 5) //What does it mean?
+ evas_object_del(obj);
+ elm_exit();
+}
+
+static void response_cert_cancel_cb( void *data, Evas_Object *obj, void *event_info)
+{
+ //Pipe will read below message and decide what user did.
+ // if ((int)event_info != 5) //What does it mean
+ evas_object_del(obj);
elm_exit();
}
void _cert(struct appdata *ad, const char *message)
{
- Evas_Object* popup = elm_popup_add(ad->win);
+ Evas_Object *popup = elm_popup_add(ad->win);
if (message && (strlen(message) > 0))
- elm_popup_desc_set(popup, message);
+ elm_object_text_set(popup, message);
else
- elm_popup_desc_set(popup, "Certificate warning");
+ elm_object_text_set(popup, "Certificate warning");
+
+ Evas_Object *btn;
+ btn = elm_button_add(popup);
+ elm_object_text_set(btn, dgettext("sys_string", "IDS_COM_SK_OK"));
+ elm_object_part_content_set(popup, "button1", btn);
+ evas_object_smart_callback_add(btn, "clicked", response_cert_ok_cb, NULL);
+ evas_object_show(btn);
- elm_popup_buttons_add(popup, 2, "Continue", ELM_POPUP_RESPONSE_OK, "Cancel", ELM_POPUP_RESPONSE_CANCEL, NULL);
+ btn = elm_button_add(popup);
+ elm_object_text_set(btn, dgettext("sys_string", "IDS_COM_SK_CANCEL"));
+ elm_object_part_content_set(popup, "button2", btn);
+ evas_object_smart_callback_add(btn, "clicked", response_cert_cancel_cb, NULL);
+ evas_object_show(btn);
- evas_object_smart_callback_add(popup, "response", response_cert_cb, NULL);
evas_object_show(popup);
}
-static void response_authentication_cb(void *data, Evas_Object *obj, void *event_info)
+static void response_authentication_ok_cb(void *data, Evas_Object *obj, void *event_info)
{
- if ((int)event_info == ELM_POPUP_RESPONSE_OK) {
- Evas_Object *content = (Evas_Object*)data;
- Eina_List *childrenList = NULL;
- Eina_List *l = NULL;
- Evas_Object_Box_Option *opt = NULL;
-
- childrenList = (Eina_List *)elm_box_children_get(content);
-
- EINA_LIST_FOREACH(childrenList, l, opt) {
- if (opt->obj && strncmp(elm_object_widget_type_get(opt->obj), "editfield", strlen("editfield")) == 0) {
- Evas_Object *editfield = opt->obj;
- printf(RESULT_KEYWORD"%s%s\n", elm_editfield_guide_text_get(editfield), elm_entry_entry_get(elm_editfield_entry_get(editfield)));
- }
+ Evas_Object *content = (Evas_Object*)data;
+ Eina_List *childrenList = NULL;
+ Eina_List *l = NULL;
+ Evas_Object_Box_Option *opt = NULL;
+
+ childrenList = (Eina_List *)elm_box_children_get(content);
+
+ EINA_LIST_FOREACH(childrenList, l, opt) {
+ if (opt->obj && strncmp(elm_object_widget_type_get(opt->obj), "editfield", strlen("editfield")) == 0) {
+ Evas_Object *editfield = opt->obj;
+ printf(RESULT_KEYWORD"%s%s\n", elm_object_part_text_get(editfield, "elm.guidetext"), elm_entry_entry_get(editfield));
}
}
elm_exit();
}
+static void response_authentication_cancel_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ elm_exit();
+}
+
+
/**
* @fn void _authentication(struct appdata *ad, const char *realm, const char *host)
* @brief open authentication dialog
*/
void _authentication(struct appdata *ad, const char *realm, const char *host)
{
- Evas_Object *popup;
+ Evas_Object *popup, *btn;
char message[MAX_BUFFER] = {0, };
popup = elm_popup_add(ad->win);
elm_popup_orient_set(popup, ELM_POPUP_ORIENT_TOP);
- elm_popup_title_label_set(popup, "Authentication Required");
- elm_popup_buttons_add(popup, 2, "Ok", ELM_POPUP_RESPONSE_OK, "Cancel", ELM_POPUP_RESPONSE_CANCEL, NULL);
+ elm_object_part_text_set(popup, "title,text", "Authentication Required");
- Evas_Object* content = elm_box_add(popup);
+ Evas_Object *content = elm_box_add(popup);
evas_object_size_hint_weight_set(content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(content, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(content);
- Evas_Object* label = elm_label_add(popup);
+ Evas_Object *label = elm_label_add(popup);
elm_label_line_wrap_set(label, ELM_WRAP_CHAR);
snprintf(message, MAX_BUFFER, "The server %s requires a username and password. The server says: %s.", host, realm);
elm_object_text_set(label, message);
evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(label);
elm_box_pack_end(content, label);
-
+#if 0
Evas_Object* editFieldUsername = elm_editfield_add(content);
elm_editfield_guide_text_set(editFieldUsername, "user name");
evas_object_size_hint_weight_set(editFieldUsername, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_entry_password_set(elm_editfield_entry_get(editFieldPassword), EINA_TRUE);
evas_object_show(editFieldPassword);
elm_box_pack_end(content, editFieldPassword);
+#else
+ Evas_Object* editFieldUsername = elm_layout_add(content);
+ elm_object_part_text_set(editFieldUsername, "elm.guidetext", "user name");
+ evas_object_size_hint_weight_set(editFieldUsername, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(editFieldUsername, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_entry_single_line_set(editFieldUsername, EINA_TRUE);
+ elm_entry_scrollable_set(editFieldUsername, EINA_TRUE);
+ evas_object_show(editFieldUsername);
+ elm_box_pack_end(content, editFieldUsername);
- elm_popup_content_set(popup, content);
- evas_object_smart_callback_add(popup, "response", response_authentication_cb, content);
+ Evas_Object* editFieldPassword = elm_layout_add(content);
+ elm_object_part_text_set(editFieldPassword, "elm.guidetext", "password");
+ evas_object_size_hint_weight_set(editFieldPassword, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(editFieldPassword, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_entry_single_line_set(editFieldPassword, EINA_TRUE);
+ elm_entry_scrollable_set(editFieldPassword, EINA_TRUE);
+ elm_entry_password_set(editFieldPassword, EINA_TRUE);
+ evas_object_show(editFieldPassword);
+ elm_box_pack_end(content, editFieldPassword);
+#endif
+ btn = elm_button_add(content);
+ elm_object_text_set(btn, dgettext("sys_string", "IDS_COM_SK_OK"));
+ elm_object_part_content_set(content, "button1", btn);
+ evas_object_smart_callback_add(btn, "clicked", response_authentication_ok_cb, content);
+ evas_object_show(btn);
+
+ btn = elm_button_add(content);
+ elm_object_text_set(btn, dgettext("sys_string", "IDS_COM_SK_CANCEL"));
+ elm_object_part_content_set(content, "button2", btn);
+ evas_object_smart_callback_add(btn, "clicked", response_authentication_cancel_cb, content);
+ evas_object_show(btn);
+
+ elm_object_content_set(popup, content);
evas_object_show(popup);
}
#include "modal_util.h"
#include <Elementary.h>
+#include <glib.h>
#include <stdio.h>
#include <utilX.h>
ecore_event_add(ECORE_EVENT_KEY_DOWN, ev, _event_free_cb, NULL);
}
-static const char* _replaceChToStr(const char* src, const char fromCh, const char* toStr, int maxLength)
+char* _replaceChToStr(const char* src, const char fromCh, const char* toStr, int maxLength)
{
- static char buffer[MAX_BUFFER] = "\"";
- int bufferOffset = 1;
+ char *buffer = NULL;
+ int bufferOffset = 0;
int toStrLength = strlen(toStr);
if (src == NULL)
return NULL;
- while (*src != '\0' && bufferOffset < maxLength - toStrLength - 2) { // -2 is for ""
+ buffer = (char *)malloc(sizeof(char) * MAX_BUFFER);
+
+ if (!buffer) return NULL;
+ memset(buffer, 0x00, sizeof(char) * MAX_BUFFER);
+
+ while (*src != '\0' && bufferOffset < maxLength - toStrLength) {
if (*src == fromCh) {
strncpy(buffer + bufferOffset, toStr, toStrLength);
bufferOffset += toStrLength;
}
src++;
}
- buffer[bufferOffset++] = '\"';
buffer[bufferOffset] = '\0';
return buffer;
}
Eina_Bool ret = EINA_FALSE;
FILE *fpipe;
char readbuf[MAX_BUFFER] = FILE_PATH " " BUNDLE_TYPE " confirm ";
+ char *base64encodedmsg = NULL;
int len = strlen(readbuf);
- const char* replacedMsg = _replaceChToStr(message, '\n', "<br>", MAX_BUFFER - len);
+ char* replacedMsg = _replaceChToStr(message, '\n', "<br>", MAX_BUFFER - len);
if (!replacedMsg) return EINA_FALSE;
- snprintf(readbuf + len, MAX_BUFFER - len, BUNDLE_MESSAGE " %s", replacedMsg);
+ base64encodedmsg = (char *)g_base64_encode((gchar *)replacedMsg, strlen(replacedMsg));
+ snprintf(readbuf + len, MAX_BUFFER - len, BUNDLE_MESSAGE " \"%s\"", base64encodedmsg);
+
+ if (base64encodedmsg) g_free(base64encodedmsg);
+ base64encodedmsg = NULL;
+
+ free(replacedMsg);
+ replacedMsg = NULL;
if ((fpipe = popen(readbuf, "r")) == NULL)
return EINA_FALSE;
break;
}
}
-
pclose(fpipe);
return ret;
}
{
FILE *fpipe;
char readbuf[MAX_BUFFER] = FILE_PATH " " BUNDLE_TYPE " alert ";
+ char *base64encodedmsg = NULL;
int len = strlen(readbuf);
- const char* replacedMsg = _replaceChToStr(message, '\n', "<br>", MAX_BUFFER - len);
+ char* replacedMsg = _replaceChToStr(message, '\n', "<br>", MAX_BUFFER - len);
if (!replacedMsg) return;
- snprintf(readbuf + len, MAX_BUFFER - len, BUNDLE_MESSAGE " %s", replacedMsg);
+ base64encodedmsg = (char *)g_base64_encode((gchar *)replacedMsg, strlen(replacedMsg));
+
+ snprintf(readbuf + len, MAX_BUFFER - len, BUNDLE_MESSAGE " \"%s\"", base64encodedmsg);
+
+ if (base64encodedmsg) g_free(base64encodedmsg);
+ base64encodedmsg = NULL;
+
+ free(replacedMsg);
+ replacedMsg = NULL;
if ((fpipe = popen(readbuf, "r")) == NULL)
return;
break;
}
}
-
pclose(fpipe);
}
Eina_Bool ret = EINA_FALSE;
FILE *fpipe;
char readbuf[MAX_BUFFER] = FILE_PATH " " BUNDLE_TYPE " prompt ";
+ char *base64encodedmsg1 = NULL;
+ char *base64encodedmsg2 = NULL;
int len = strlen(readbuf);
- const char* replacedMsg = _replaceChToStr(message, '\n', "<br>", MAX_BUFFER - len);
+ char* replacedMsg = _replaceChToStr(message, '\n', "<br>", MAX_BUFFER - len);
if (!replacedMsg)
return EINA_FALSE;
- snprintf(readbuf + len, MAX_BUFFER - len, BUNDLE_MESSAGE " %s ", replacedMsg);
+
+ base64encodedmsg1 = (char *)g_base64_encode((gchar *)replacedMsg, strlen(replacedMsg));
+ snprintf(readbuf + len, MAX_BUFFER - len, BUNDLE_MESSAGE " \"%s\" ", base64encodedmsg1);
len = strlen(readbuf);
+ free(replacedMsg);
+ replacedMsg = NULL;
+
replacedMsg = _replaceChToStr(defaultValue, '\n', "<br>", MAX_BUFFER - len);
+ base64encodedmsg2 = (char *)g_base64_encode((gchar *)replacedMsg, strlen(replacedMsg));
+
if (defaultValue && strlen(defaultValue))
- snprintf(readbuf + len, MAX_BUFFER - len, BUNDLE_VALUE " %s", replacedMsg);
+ snprintf(readbuf + len, MAX_BUFFER - len, BUNDLE_VALUE " \"%s\"", base64encodedmsg2);
+
+ if (base64encodedmsg1) g_free(base64encodedmsg1);
+ base64encodedmsg1 = NULL;
+ if (base64encodedmsg2) g_free(base64encodedmsg2);
+ base64encodedmsg2 = NULL;
+
+ free(replacedMsg);
+ replacedMsg = NULL;
if ((fpipe = popen(readbuf, "r")) == NULL)
return EINA_FALSE;
break;
}
}
-
pclose(fpipe);
return ret;
}
Eina_Bool ret = EINA_FALSE;
FILE *fpipe;
char readbuf[MAX_BUFFER] = FILE_PATH " " BUNDLE_TYPE " authentication ";
+ char *base64encodedmsg = NULL;
int len = strlen(readbuf);
- const char* replacedRealm = _replaceChToStr(realm, '\n', "<br>", MAX_BUFFER - len);
+ char* replacedRealm = _replaceChToStr(realm, '\n', "<br>", MAX_BUFFER - len);
if (!replacedRealm)
return EINA_FALSE;
- snprintf(readbuf + len, MAX_BUFFER - len, BUNDLE_REALM " %s " BUNDLE_HOST " \"%s\"", replacedRealm, host);
+ base64encodedmsg = (char *)g_base64_encode((gchar *)replacedRealm, strlen(replacedRealm));
+ snprintf(readbuf + len, MAX_BUFFER - len, BUNDLE_REALM " %s " BUNDLE_HOST " \"%s\"", base64encodedmsg, host);
+
+ if (base64encodedmsg) g_free(base64encodedmsg);
+ base64encodedmsg = NULL;
+
+ free(replacedRealm);
+ replacedRealm = NULL;
if ((fpipe = popen(readbuf, "r")) == NULL)
return EINA_FALSE;
--- /dev/null
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
Name: elm-webview
Summary: Elementary webkit widget
-Version: 1.0.126
+Version: 1.0.1
Release: 1
Group: libdevel
-License: TO_BE_FILLED
-URL: N/A
+License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
+Source1001: packaging/elm-webview.manifest
BuildRequires: pkgconfig(elementary)
BuildRequires: pkgconfig(appcore-efl)
BuildRequires: pkgconfig(ewebkit)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(gnutls)
BuildRequires: cmake
+BuildRequires: edje-tools
%description
%build
+cp %{SOURCE1001} .
cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
make %{?jobs:-j%jobs}
%install
-rm -rf %{buildroot}
%make_install
-%post devel -p /sbin/ldconfig
+%post -p /sbin/ldconfig
-%postun devel -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
%files
-%defattr(-,root,root,-)
+%manifest elm-webview.manifest
%{_libdir}/*.so.*
%{_bindir}/*
+/usr/share/edje/*.edj
%files devel
-%defattr(-,root,root,-)
+%manifest elm-webview.manifest
%{_libdir}/*.so
%{_includedir}/*
%{_libdir}/pkgconfig/*.pc
return;
Elm_WebView_Context_Menu_Data* context_menu_data = (Elm_WebView_Context_Menu_Data*) event_info;
- evas_object_move(ad->popup, context_menu_data->mouse_down_event.canvas.x, context_menu_data->mouse_down_event.canvas.y - 60 * elm_scale_get());
+ evas_object_move(ad->popup, context_menu_data->mouse_down_event.canvas.x, context_menu_data->mouse_down_event.canvas.y - 60 * elm_config_scale_get());
evas_object_show(ad->popup);
}
return;
Evas_Point* position = (Evas_Point *)event_info;
- evas_object_move(ad->popup, position->x, position->y - 60 * elm_scale_get());
+ evas_object_move(ad->popup, position->x, position->y - 60 * elm_config_scale_get());
evas_object_show(ad->popup);
}
}
}
}
- elm_object_tree_unfocusable_set(ad->popup, EINA_TRUE);
+ elm_object_tree_focus_allow_set(ad->popup, EINA_TRUE);
}
static void contextmenu_webkit_item_callback(void *data, Evas_Object *obj, void *event_info)
return;
}
- if (!strcmp(elm_ctxpopup_item_label_get(item), "More"))
+ if (!strcmp(elm_object_item_text_get(item), "More"))
elm_webview_cbhm_run(webview);
if (webview)
#include <Elementary.h>
#include <math.h>
-#include <elm_widget.h>
#include "els_touch.h"
#include "../log.h"
static const char SMART_NAME[] = "els_touch";
#define API_ENTRY Smart_Data *sd; sd = evas_object_smart_data_get(obj); if (EINA_UNLIKELY((!sd) || strncmp(evas_object_type_get(obj), SMART_NAME, strlen(SMART_NAME))))
#define INTERNAL_ENTRY Smart_Data *sd; sd = evas_object_smart_data_get(obj); if (!sd) return;
+//#define MOTION_UI
// TAP and PRESS threshold time (ms)
#define TAP_TIME 250 // ms
TOUCH_STATE_DOWN,
TOUCH_STATE_DOWN_DURING_DRAG,
TOUCH_STATE_DOWN_UP,
+ TOUCH_STATE_DOWN_UP_DURING_DRAG,
TOUCH_STATE_DOWN_UP_DOWN,
TOUCH_STATE_LONG_PRESS,
TOUCH_STATE_LONG_PRESS_DRAG,
Ecore_Timer *tap_timer;
Ecore_Timer *long_press_timer;
Ecore_Timer *two_tap_timer;
+
+ Eina_Bool edge_top;
+ Eina_Bool edge_bottom;
+ Eina_Bool edge_left;
+ Eina_Bool edge_right;
};
/* local subsystem functions */
sd->is_one_drag_mode = is_one_drag_mode;
}
+/**
+ * @fn void _elm_smart_touch_edge_top_set(Evas_Object *obj)
+ * @brief set the edge top state which means that current scroll has reached the edge top
+ *
+ * @param[in] obj touch Evas_Object
+ */
+void
+_elm_smart_touch_edge_top_set(Evas_Object *obj)
+{
+ API_ENTRY return;
+ ELM_WEBVIEW_SLOGD("\n");
+ sd->edge_top = EINA_TRUE;
+}
+
+/**
+ * @fn void _elm_smart_touch_edge_bottom_set(Evas_Object *obj)
+ * @brief set the edge bottom state which means that current scroll has reached the edge bottom
+ *
+ * @param[in] obj touch Evas_Object
+ */
+void
+_elm_smart_touch_edge_bottom_set(Evas_Object *obj)
+{
+ API_ENTRY return;
+ ELM_WEBVIEW_SLOGD("\n");
+ sd->edge_bottom = EINA_TRUE;
+}
+
+/**
+ * @fn void _elm_smart_touch_edge_left_set(Evas_Object *obj)
+ * @brief set the edge left state which means that current scroll has reached the edge left
+ *
+ * @param[in] obj touch Evas_Object
+ */
+void
+_elm_smart_touch_edge_left_set(Evas_Object *obj)
+{
+ API_ENTRY return;
+ ELM_WEBVIEW_SLOGD("\n");
+ sd->edge_left = EINA_TRUE;
+}
+
+/**
+ * @fn void _elm_smart_touch_edge_right_set(Evas_Object *obj)
+ * @brief set the edge right state which means that current scroll has reached the edge right
+ *
+ * @param[in] obj touch Evas_Object
+ */
+void
+_elm_smart_touch_edge_right_set(Evas_Object *obj)
+{
+ API_ENTRY return;
+ ELM_WEBVIEW_SLOGD("\n");
+ sd->edge_right = EINA_TRUE;
+}
+
/* mouse callbacks */
/**
* @fn static void _smart_mouse_down(void *data, Evas *e, Evas_Object *obj, void *ev)
event = (Evas_Event_Mouse_Down *)ev;
ELM_WEBVIEW_SLOGD("[%d]\n", event->flags);
+ sd->edge_top = EINA_FALSE;
+ sd->edge_bottom = EINA_FALSE;
+ sd->edge_left = EINA_FALSE;
+ sd->edge_right = EINA_FALSE;
+
touch_point.device = 0;
touch_point.x = event->canvas.x;
touch_point.y = event->canvas.y;
_smart_set_first_down(sd, 0, &touch_point);
_smart_set_last_down(sd, 0, &touch_point);
_smart_set_last_drag(sd, 0, &touch_point);
- if (sd->animator_move)
- {
- ecore_animator_del(sd->animator_move);
- sd->animator_move = NULL;
- }
+ _smart_stop_animator_move(sd);
_smart_enter_down_during_drag(sd);
break;
case TOUCH_STATE_DOWN_UP:
+ case TOUCH_STATE_DOWN_UP_DURING_DRAG:
// process the double down
_smart_set_last_down(sd, 0, &touch_point);
_smart_set_last_drag(sd, 0, &touch_point);
switch (sd->state)
{
case TOUCH_STATE_DOWN:
+ case TOUCH_STATE_DOWN_DURING_DRAG:
_smart_stop_animator_move(sd);
_smart_enter_down_up(sd, (event->timestamp - sd->last_down[0].time), event->timestamp);
break;
- case TOUCH_STATE_DOWN_DURING_DRAG:
- {
- Evas_Point point;
- point.x = sd->last_drag[0].x;
- point.y = sd->last_drag[0].y;
- evas_object_smart_callback_call(sd->child_obj, "one,move,end", &point);
- // we have to send 'one,flick,end' because we will not run the flick animator
- evas_object_smart_callback_call(sd->child_obj, "one,flick,end", &point);
- _smart_enter_down_up(sd, (event->timestamp - sd->last_down[0].time), event->timestamp);
- } break;
-
case TOUCH_STATE_DOWN_UP_DOWN:
{
int dx = sd->last_down[0].x - sd->first_down[0].x;
_smart_set_last_down(sd, 0, &touch_point);
- thumbscroll_threshold = (int) elm_scroll_thumbscroll_threshold_get();
+ thumbscroll_threshold = (int) elm_config_scroll_thumbscroll_threshold_get();
if (((dx * dx) + (dy * dy)) >
(thumbscroll_threshold * thumbscroll_threshold))
{
dx = touch_point.x - sd->last_drag[0].x;
dy = touch_point.y - sd->last_drag[0].y;
- thumbscroll_threshold = (int) elm_scroll_thumbscroll_threshold_get();
+ thumbscroll_threshold = (int) elm_config_scroll_thumbscroll_threshold_get();
if (((dx * dx) + (dy * dy)) >
(thumbscroll_threshold * thumbscroll_threshold))
{
dx = touch_point.x - sd->last_drag[0].x;
dy = touch_point.y - sd->last_drag[0].y;
- thumbscroll_threshold = (int) elm_scroll_thumbscroll_threshold_get();
+ thumbscroll_threshold = (int) elm_config_scroll_thumbscroll_threshold_get();
if (((dx * dx) + (dy * dy)) >
(thumbscroll_threshold * thumbscroll_threshold))
{
{
int dx = touch_point.x - sd->last_drag[0].x;
int dy = touch_point.y - sd->last_drag[0].y;
- int thumbscroll_threshold = (int) elm_scroll_thumbscroll_threshold_get();
+ int thumbscroll_threshold = (int) elm_config_scroll_thumbscroll_threshold_get();
if (((dx * dx) + (dy * dy)) >
(thumbscroll_threshold * thumbscroll_threshold))
sd->released_finger_index = MOUSEEVENT_FINGER_INDEX;
ELM_WEBVIEW_SLOGD("\nTOUCH_STATE_NONE\n");
+#ifdef MOTION_UI
+ evas_object_smart_callback_call(sd->child_obj, "tilt,zoom,end", NULL);
+#endif
}
/**
// add long press timer
if (sd->long_press_timer)
ecore_timer_del(sd->long_press_timer);
- sd->long_press_timer = ecore_timer_add(elm_longpress_timeout_get(), _smart_long_press_timer_handler, sd);
+ sd->long_press_timer = ecore_timer_add(elm_config_longpress_timeout_get(), _smart_long_press_timer_handler, sd);
// set state
sd->state = TOUCH_STATE_DOWN;
// we set the timer and change the state to DOWN_UP
if (timerTime > 0)
{
- if (sd->state == TOUCH_STATE_DOWN)
+ if (sd->state == TOUCH_STATE_DOWN || sd->state == TOUCH_STATE_DOWN_DURING_DRAG)
sd->tap_timer = ecore_timer_add(((double)timerTime)/1000.0, _smart_tap_timer_handler, sd);
- sd->state = TOUCH_STATE_DOWN_UP;
+ if (sd->state == TOUCH_STATE_DOWN_DURING_DRAG)
+ sd->state = TOUCH_STATE_DOWN_UP_DURING_DRAG;
+ else
+ sd->state = TOUCH_STATE_DOWN_UP;
ELM_WEBVIEW_SLOGD("\nTOUCH_STATE_DOWN_UP\n");
}
// if we do not have to wait for double tap (because too much time is passed)
_smart_emit_two_press(sd);
sd->state = TOUCH_STATE_TWO_DOWN;
ELM_WEBVIEW_SLOGD("\nTOUCH_STATE_TWO_DOWN\n");
+#ifdef MOTION_UI
+ Touch_Point two_point_data[2];
+ two_point_data[0] = sd->last_drag[0];
+ two_point_data[1] = sd->last_drag[1];
+ two_point_data[0].state = TOUCH_POINT_PRESSED;
+ two_point_data[1].state = TOUCH_POINT_PRESSED;
+ evas_object_smart_callback_call(sd->child_obj, "tilt,zoom,start", two_point_data);
+#endif
}
/**
two_point_data[0] = sd->last_down[0];
two_point_data[1] = sd->last_down[1];
evas_object_smart_callback_call(sd->child_obj, "two,release", two_point_data);
+#ifdef MOTION_UI
+ evas_object_smart_callback_call(sd->child_obj, "tilt,zoom,end", NULL);
+#endif
}
}
/**
point_data = sd->last_drag[sd->released_finger_index];
ELM_WEBVIEW_SLOGD("<< emit_two_move_end >> point_data(%d, %d) last_drag[0] (%d, %d) last_drag[1] (%d, %d)\n",
point_data.x, point_data.y, sd->last_drag[0].x, sd->last_drag[0].y, sd->last_drag[1].x, sd->last_drag[1].y);
+#ifdef MOTION_UI
+ evas_object_smart_callback_call(sd->child_obj, "tilt,zoom,end", NULL);
+#endif
evas_object_smart_callback_call(sd->child_obj, "two,move,end", &point_data);
}
}
Smart_Data *sd;
sd = data;
- _smart_emit_tap(sd);
+ if (sd->state != TOUCH_STATE_DOWN_UP_DURING_DRAG)
+ _smart_emit_tap(sd);
+
_smart_stop_all_timers(sd);
_smart_enter_none(sd);
sd->tap_timer = NULL;
void _elm_smart_touch_support_multi_event_set (Evas_Object *obj, Eina_Bool support_multi_event);
Two_Drag_Mode two_drag_mode_get(Touch_Point *first_points, Touch_Point *last_points);
+void _elm_smart_touch_edge_top_set(Evas_Object *obj);
+void _elm_smart_touch_edge_bottom_set(Evas_Object *obj);
+void _elm_smart_touch_edge_left_set(Evas_Object *obj);
+void _elm_smart_touch_edge_right_set(Evas_Object *obj);
+
#endif