EAPI Evas_Object *elm_webview_minimap_get(Evas_Object *obj);
EAPI void elm_webview_uri_set(Evas_Object *obj, const char *uri);
EAPI void elm_webview_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce);
- EAPI void elm_webview_mime_callback_set(Evas_Object *obj, const char *mime, Elm_WebView_Mime_Cb func);
+ EAPI void elm_webview_scheme_callback_set(Evas_Object *obj, const char *scheme, Elm_WebView_Mime_Cb func);
EAPI void elm_webview_default_layout_width_set(Evas_Object *obj, int width);
/* NoContents */
}
/**
- * Add callback to treat mime type
+ * Add callback to treat scheme
*
- * When user click link, the WebView may have different action by mime type.
- * This is a way to choose proper action each mime type.
+ * When user click link, the WebView may have different action by scheme.
+ * This is a way to choose proper action each scheme.
*
* @param obj The WebView object
- * @param mime mime type string
- * @param mime_callback callback when user choose link which involved @mime
+ * @param scheme The scheme which user want to receive
+ * @param scheme_callback callback when user choose link which involved @scheme
*
* @ingroup WebView
*/
EAPI void
-elm_webview_mime_callback_set(Evas_Object *obj, const char *mime, Elm_WebView_Mime_Cb func)
+elm_webview_scheme_callback_set(Evas_Object *obj, const char *scheme, Elm_WebView_Mime_Cb func)
{
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- _elm_smart_webview_mime_callback_set(wd->webkit, mime, func);
+ _elm_smart_webview_scheme_callback_set(wd->webkit, scheme, func);
}
/**
#endif
Ecore_Job *move_calc_job;
Ecore_Job *resize_calc_job;
- Eina_Hash* mime_func_hash;
+ Eina_Hash* scheme_func_hash;
int locked_dx;
int locked_dy;
unsigned char bounce_horiz : 1;
}
void
-_elm_smart_webview_mime_callback_set(Evas_Object* obj, const char *mime, Elm_WebView_Mime_Cb func)
+_elm_smart_webview_scheme_callback_set(Evas_Object* obj, const char *scheme, Elm_WebView_Mime_Cb func)
{
API_ENTRY return;
- if (!sd->mime_func_hash)
- sd->mime_func_hash = eina_hash_pointer_new(NULL);
+ if (!sd->scheme_func_hash)
+ sd->scheme_func_hash = eina_hash_pointer_new(NULL);
if (!func)
- eina_hash_del(sd->mime_func_hash, mime, func);
+ eina_hash_del(sd->scheme_func_hash, scheme, func);
else
- eina_hash_add(sd->mime_func_hash, mime, func);
+ eina_hash_add(sd->scheme_func_hash, scheme, func);
}
void
Elm_WebView_Mime_Cb func = NULL;
Smart_Data *sd = (Smart_Data*)esd;
- if (sd->mime_func_hash)
+ if (sd->scheme_func_hash)
{
protocol_hack = strstr(request->url, ":");
*protocol_hack = '\0';
- func = (Elm_WebView_Mime_Cb) eina_hash_find(sd->mime_func_hash, request->url);
+ func = (Elm_WebView_Mime_Cb) eina_hash_find(sd->scheme_func_hash, request->url);
*protocol_hack = ':';
}
void _elm_smart_webview_events_feed_set(Evas_Object* obj, Eina_Bool feed);
Eina_Bool _elm_smart_webview_events_feed_get(Evas_Object* obj);
void _elm_smart_webview_bounce_allow_set(Evas_Object* obj, Eina_Bool horiz, Eina_Bool vert);
-void _elm_smart_webview_mime_callback_set(Evas_Object* obj, const char *mime, Elm_WebView_Mime_Cb func);
+void _elm_smart_webview_scheme_callback_set(Evas_Object* obj, const char *scheme, Elm_WebView_Mime_Cb func);
void _elm_smart_webview_default_layout_width_set(Evas_Object *obj, int width);
#ifdef BOUNCING_SUPPORT
void _elm_smart_webview_container_set(Evas_Object *obj, Evas_Object *container);