A web widget is used for displaying web pages (HTML/CSS/JS) using WebKit-EFL. You must have compiled Elementary with ewebkit support.
download,request
: A file download has been requested. Event info is
a WebDownload instance
editorclient,contents,changed
: Editor client’s contents changed
editorclient,selection,changed
: Editor client’s selection changed
frame,created
: A new frame was created. Event info is an
Evas_Object which can be handled with WebKit’s ewk_frame API
icon,received
: An icon was received by the main frame
inputmethod,changed
: Input method changed. Event info is an
Eina_Bool indicating whether it’s enabled or not
js,windowobject,clear
: JS window object has been cleared
link,hover,in
: Mouse cursor is hovering over a link. Event info
is a tuple, where the first string contains the URL the link
points to, and the second one the title of the link
link,hover,out
: Mouse cursor left the link
load,document,finished
: Loading of a document finished. Event info
is the frame that finished loading
load,error
: Load failed. Event info is a WebFrameLoadError instance
load,finished
: Load finished. Event info is None on success, on
error it’s a WebFrameLoadError instance
load,newwindow,show
: A new window was created and is ready to be
shown
load,progress
: Overall load progress. Event info is
a double containing a value between 0.0 and 1.0
load,provisional
: Started provisional load
load,started
: Loading of a document started
menubar,visible,get
: Queries if the menubar is visible. Event info
is a bool where the callback should set True if
the menubar is visible, or False in case it’s not
menubar,visible,set
: Informs menubar visibility. Event info is
a bool indicating the visibility
popup,created
: A dropdown widget was activated, requesting its
popup menu to be created. Event info is a WebMenu instance
popup,willdelete
: The web object is ready to destroy the popup
object created. Event info is a WebMenu instance
ready
: Page is fully loaded
scrollbars,visible,get
: Queries visibility of scrollbars. Event
info is a bool where the visibility state should be set
scrollbars,visible,set
: Informs scrollbars visibility. Event info
is an Eina_Bool with the visibility state set
statusbar,text,set
: Text of the statusbar changed. Event info is
a string with the new text
statusbar,visible,get
: Queries visibility of the status bar.
Event info is a bool where the visibility state should be
set.
statusbar,visible,set
: Informs statusbar visibility. Event info is
an Eina_Bool with the visibility value
title,changed
: Title of the main frame changed. Event info is a
string with the new title
toolbars,visible,get
: Queries visibility of toolbars. Event info
is a bool where the visibility state should be set
toolbars,visible,set
: Informs the visibility of toolbars. Event
info is an Eina_Bool with the visibility state
tooltip,text,set
: Show and set text of a tooltip. Event info is
a string with the text to show
uri,changed
: URI of the main frame changed. Event info is a string (deprecated. use url,changed
instead)
url,changed
: URL of the main frame changed. Event info is a string
with the new URI
view,resized
: The web object internal’s view changed sized
windows,close,request
: A JavaScript request to close the current
window was requested
zoom,animated,end
: Animated zoom finished
efl.elementary.
ELM_WEB_WINDOW_FEATURE_TOOLBAR
¶Toolbar
efl.elementary.
ELM_WEB_WINDOW_FEATURE_STATUSBAR
¶Status bar
efl.elementary.
ELM_WEB_WINDOW_FEATURE_SCROLLBARS
¶Scrollbars
efl.elementary.
ELM_WEB_WINDOW_FEATURE_MENUBAR
¶Menu bar
efl.elementary.
ELM_WEB_WINDOW_FEATURE_LOCATIONBAR
¶Location bar
efl.elementary.
ELM_WEB_WINDOW_FEATURE_FULLSCREEN
¶Fullscreen
efl.elementary.
Web
(Object parent, *args, **kwargs)¶Bases: efl.elementary.__init__.Object
parent (efl.evas.Object
) – The parent object
**kwargs – All the remaining keyword arguments are interpreted as properties of the instance
back
¶Goes back one step in the browsing history
This is equivalent to calling elm_web_object_navigate(obj, -1);
True on success, False otherwise
elm_web_history_enabled_set()
elm_web_back_possible()
elm_web_forward()
elm_web_navigate()
back_possible
¶Queries whether it’s possible to go back in history
True if it’s possible to back in history, False otherwise
bg_color
¶The background color to be used by the web object
This is the color that will be used by default when the loaded page does not set it’s own. Color values are pre-multiplied.
r – Red component
g – Green component
b – Blue component
a – Alpha component
callback_editorclient_contents_changed_add
¶Editor client’s contents changed.
callback_editorclient_contents_changed_del
¶callback_editorclient_selection_changed_add
¶Editor client’s selection changed.
callback_editorclient_selection_changed_del
¶callback_icon_received_add
¶An icon was received by the main frame.
callback_icon_received_del
¶callback_inputmethod_changed_add
¶Input method changed. Event info is an Eina_Bool indicating whether it’s enabled or not.
callback_inputmethod_changed_del
¶callback_js_windowobject_clear_add
¶JS window object has been cleared.
callback_js_windowobject_clear_del
¶callback_link_hover_in_add
¶Mouse cursor is hovering over a link. Event info is a tuple, where the first string contains the URL the link points to, and the second one the title of the link.
callback_link_hover_in_del
¶callback_link_hover_out_add
¶Mouse cursor left the link.
callback_link_hover_out_del
¶callback_load_error_add
¶Load failed. Event info is a WebFrameLoadError instance.
callback_load_error_del
¶callback_load_finished_add
¶Load finished. Event info is None on success, on error it’s a pointer to Elm_Web_Frame_Load_Error.
callback_load_finished_del
¶callback_load_newwindow_show_add
¶A new window was created and is ready to be shown.
callback_load_newwindow_show_del
¶callback_load_progress_add
¶Overall load progress. Event info is a double containing a value between 0.0 and 1.0.
callback_load_progress_del
¶callback_load_provisional_add
¶Started provisional load.
callback_load_provisional_del
¶callback_load_started_add
¶Loading of a document started.
callback_load_started_del
¶Informs menubar visibility. Event info is a bool indicating the visibility.
callback_ready_add
¶Page is fully loaded.
callback_ready_del
¶callback_scrollbars_visible_set_add
¶Informs scrollbars visibility. Event info is a bool with the visibility state set.
callback_scrollbars_visible_set_del
¶callback_statusbar_text_set_add
¶Text of the statusbar changed. Event info is a string with the new text.
callback_statusbar_text_set_del
¶callback_statusbar_visible_set_add
¶Informs statusbar visibility. Event info is a bool with the visibility value.
callback_statusbar_visible_set_del
¶callback_title_changed_add
¶Title of the main frame changed. Event info is a string with the new title.
callback_title_changed_del
¶callback_toolbars_visible_set_add
¶Informs the visibility of toolbars. Event info is a bool with the visibility state.
callback_toolbars_visible_set_del
¶callback_tooltip_text_set_add
¶Show and set text of a tooltip. Event info is a string with the text to show.
callback_tooltip_text_set_del
¶callback_uri_changed_add
¶URI of the main frame changed. Event info is a string. (deprecated. use “url,changed” instead)
callback_uri_changed_del
¶callback_url_changed_add
¶URL of the main frame changed. Event info is a string with the new URI.
callback_url_changed_del
¶callback_view_resized_add
¶The web object internal’s view changed sized.
callback_view_resized_del
¶callback_windows_close_request_add
¶A JavaScript request to close the current window was requested.
callback_windows_close_request_del
¶callback_zoom_animated_end_add
¶Animated zoom finished.
callback_zoom_animated_end_del
¶console_message_hook_set
¶Sets the function to call when a console message is emitted from JS
This hook will be called when a console message is emitted from JavaScript. There is no default implementation for this feature.
func – The callback function to be used
data – User data
forward
¶Goes forward one step in the browsing history
This is equivalent to calling elm_web_object_navigate(obj, 1);
True on success, False otherwise
elm_web_history_enabled_set()
elm_web_forward_possible_get()
elm_web_back()
elm_web_navigate()
forward_possible
¶Queries whether it’s possible to go forward in history
True if it’s possible to forward in history, False otherwise
history_enabled
¶Whether browsing history is enabled for the given object
bool
history_enabled_get
¶history_enabled_set
¶inwin_mode
¶Whether the default dialogs use an Inwin instead of a normal window
If set, then the default implementation for the JavaScript dialogs and file selector will be opened in an Inwin. Otherwise they will use a normal separated window.
bool
load_progress
¶Get the overall loading progress of the page
Returns the estimated loading progress of the page, with a value between 0.0 and 1.0. This is an estimated progress accounting for all the frames included in the page.
A value between 0.0 and 1.0 indicating the progress, or -1.0 on failure
Jumps the given number of steps in the browsing history
The @p steps value can be a negative integer to back in history, or a positive to move forward.
steps – The number of steps to jump
True on success, False on error or if not enough history exists to jump the given number of steps
elm_web_history_enabled_set()
elm_web_back()
elm_web_forward()
Queries whether it’s possible to jump the given number of steps
The @p steps value can be a negative integer to back in history, or a positive to move forward. :param steps: The number of steps to check for
True if enough history exists to perform the given jump, False otherwise
popup_destroy
¶Dismisses an open dropdown popup
When the popup from a dropdown widget is to be dismissed, either after selecting an option or to cancel it, this function must be called, which will later emit an “popup,willdelete” signal to notify the user that any memory and objects related to this popup can be freed.
True if the menu was successfully destroyed, or False if there was no menu to destroy
popup_selected_set
¶Tells the web object which index in the currently open popup was selected
When the user handles the popup creation from the “popup,created” signal, it needs to tell the web object which item was selected by calling this function with the index corresponding to the item.
index – The index selected
elm_web_popup_destroy()
region_bring_in
¶Brings in the region to the visible area
Like elm_web_region_show(), but it animates the scrolling of the object to show the area
x – The x coordinate of the region to show
y – The y coordinate of the region to show
w – The width of the region to show
h – The height of the region to show
region_show
¶Shows the given region in the web object
x – The x coordinate of the region to show
y – The y coordinate of the region to show
w – The width of the region to show
h – The height of the region to show
reload
¶Requests a reload of the current document in the object
True on success, False otherwise
reload_full
¶Requests a reload of the current document, avoiding any existing caches
True on success, False otherwise
selection
¶Get a copy of the currently selected text
The string returned must be freed by the user when it’s done with it.
A newly allocated string, or None if nothing is selected or an error occurred
stop
¶Stops loading the current page
Cancels the loading of the current page in the web object. This will cause a “load,error” signal to be emitted, with the is_cancellation flag set to True.
True if the cancel was successful, False otherwise
text_matches_highlight
¶Whether to highlight the matched marks
If enabled, marks set with elm_web_text_matches_mark() will be highlighted.
bool
text_matches_mark
¶Marks matches of the given string in a document.
string – String to match
case_sensitive – If match should be case sensitive or not
highlight – If matches should be highlighted
limit – Maximum amount of matches, or zero to unlimited
number of matched @a string
text_matches_unmark_all
¶Clears all marked matches in the document
True on success, False otherwise
text_search
¶Searches the given string in a document.
string – String to search
case_sensitive – If search should be case sensitive or not
forward – If search is from cursor and on or backwards
wrap – If search should wrap at the end
True if the given string was found, False if not or failure
title
¶Get the current title
The returned string must not be freed and is guaranteed to be stringshared.
string
uri
¶Deprecated since version 1.8: Use property “url” instead.
uri_get
¶Deprecated since version 1.8: Use property url instead.
uri_set
¶Deprecated since version 1.8: Use property url instead.
url
¶The URL for the web object
It must be a full URL, with resource included, in the form http://www.enlightenment.org or file:///tmp/something.html
The returned string must not be freed and is guaranteed to be stringshared.
string
RuntimeError – if url could not be set
New in version 1.8.
url_get
¶url_set
¶useragent
¶useragent of a elm_web object
string
useragent_get
¶useragent_set
¶webkit_view_get
¶zoom
¶Sets the zoom level of the web object
Zoom level matches the Webkit API, so 1.0 means normal zoom, with higher values meaning zoom in and lower meaning zoom out. This function will only affect the zoom level if the mode set with elm_web_zoom_mode_set() is ::ELM_WEB_ZOOM_MODE_MANUAL.
Note that this is the zoom level set on the web object and not that of the underlying Webkit one. In the ::ELM_WEB_ZOOM_MODE_MANUAL mode, the two zoom levels should match, but for the other two modes the Webkit zoom is calculated internally to match the chosen mode without changing the zoom level set for the web object.
float
zoom_get
¶zoom_mode
¶The zoom mode to use
The modes can be any of those defined in ::Elm_Web_Zoom_Mode, except ::ELM_WEB_ZOOM_MODE_LAST. The default is ::ELM_WEB_ZOOM_MODE_MANUAL.
::ELM_WEB_ZOOM_MODE_MANUAL means the zoom level will be controlled with the elm_web_zoom_set() function. ::ELM_WEB_ZOOM_MODE_AUTO_FIT will calculate the needed zoom level to make sure the entirety of the web object’s contents are shown. ::ELM_WEB_ZOOM_MODE_AUTO_FILL will calculate the needed zoom level to fit the contents in the web object’s size, without leaving any space unused.
zoom_mode_get
¶zoom_mode_set
¶zoom_set
¶