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 instanceeditorclient,contents,changed
: Editor client’s contents changededitorclient,selection,changed
: Editor client’s selection changedframe,created
: A new frame was created. Event info is an
Evas_Object which can be handled with WebKit’s ewk_frame APIicon,received
: An icon was received by the main frameinputmethod,changed
: Input method changed. Event info is an
Eina_Bool indicating whether it’s enabled or notjs,windowobject,clear
: JS window object has been clearedlink,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 linklink,hover,out
: Mouse cursor left the linkload,document,finished
: Loading of a document finished. Event info
is the frame that finished loadingload,error
: Load failed. Event info is a WebFrameLoadError instanceload,finished
: Load finished. Event info is None on success, on
error it’s a WebFrameLoadError instanceload,newwindow,show
: A new window was created and is ready to be
shownload,progress
: Overall load progress. Event info is
a double containing a value between 0.0 and 1.0load,provisional
: Started provisional loadload,started
: Loading of a document startedmenubar,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 notmenubar,visible,set
: Informs menubar visibility. Event info is
a bool indicating the visibilitypopup,created
: A dropdown widget was activated, requesting its
popup menu to be created. Event info is a WebMenu instancepopup,willdelete
: The web object is ready to destroy the popup
object created. Event info is a WebMenu instanceready
: Page is fully loadedscrollbars,visible,get
: Queries visibility of scrollbars. Event
info is a bool where the visibility state should be setscrollbars,visible,set
: Informs scrollbars visibility. Event info
is an Eina_Bool with the visibility state setstatusbar,text,set
: Text of the statusbar changed. Event info is
a string with the new textstatusbar,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 valuetitle,changed
: Title of the main frame changed. Event info is a
string with the new titletoolbars,visible,get
: Queries visibility of toolbars. Event info
is a bool where the visibility state should be settoolbars,visible,set
: Informs the visibility of toolbars. Event
info is an Eina_Bool with the visibility statetooltip,text,set
: Show and set text of a tooltip. Event info is
a string with the text to showuri,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 URIview,resized
: The web object internal’s view changed sizedwindows,close,request
: A JavaScript request to close the current
window was requestedzoom,animated,end
: Animated zoom finishedfocused
: When the web has received focus. (since 1.8)unfocused
: When the web has lost focus. (since 1.8)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
Parameters: |
|
---|
back
()¶Goes back one step in the browsing history
This is equivalent to calling elm_web_object_navigate(obj, -1);
Returns: | True on success, False otherwise |
---|---|
See: | elm_web_history_enabled_set() |
See: | elm_web_back_possible() |
See: | elm_web_forward() |
See: | elm_web_navigate() |
back_possible
¶Queries whether it’s possible to go back in history
Returns: | 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.
Parameters: |
|
---|
callback_editorclient_contents_changed_add
(func, *args, **kwargs)¶Editor client’s contents changed.
callback_editorclient_contents_changed_del
(func)¶callback_editorclient_selection_changed_add
(func, *args, **kwargs)¶Editor client’s selection changed.
callback_editorclient_selection_changed_del
(func)¶callback_focused_add
(func, *args, **kwargs)¶When the web has received focus.
New in version 1.8.
callback_focused_del
(func)¶callback_icon_received_add
(func, *args, **kwargs)¶An icon was received by the main frame.
callback_icon_received_del
(func)¶callback_inputmethod_changed_add
(func, *args, **kwargs)¶Input method changed. Event info is an Eina_Bool indicating whether it’s enabled or not.
callback_inputmethod_changed_del
(func)¶callback_js_windowobject_clear_add
(func, *args, **kwargs)¶JS window object has been cleared.
callback_js_windowobject_clear_del
(func)¶callback_link_hover_in_add
(func, *args, **kwargs)¶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
(func)¶callback_link_hover_out_add
(func, *args, **kwargs)¶Mouse cursor left the link.
callback_link_hover_out_del
(func)¶callback_load_error_add
(func, *args, **kwargs)¶Load failed. Event info is a WebFrameLoadError instance.
callback_load_error_del
(func)¶callback_load_finished_add
(func, *args, **kwargs)¶Load finished. Event info is None on success, on error it’s a pointer to Elm_Web_Frame_Load_Error.
callback_load_finished_del
(func)¶callback_load_newwindow_show_add
(func, *args, **kwargs)¶A new window was created and is ready to be shown.
callback_load_newwindow_show_del
(func)¶callback_load_progress_add
(func, *args, **kwargs)¶Overall load progress. Event info is a double containing a value between 0.0 and 1.0.
callback_load_progress_del
(func)¶callback_load_provisional_add
(func, *args, **kwargs)¶Started provisional load.
callback_load_provisional_del
(func)¶callback_load_started_add
(func, *args, **kwargs)¶Loading of a document started.
callback_load_started_del
(func)¶Informs menubar visibility. Event info is a bool indicating the visibility.
callback_ready_add
(func, *args, **kwargs)¶Page is fully loaded.
callback_ready_del
(func)¶callback_scrollbars_visible_set_add
(func, *args, **kwargs)¶Informs scrollbars visibility. Event info is a bool with the visibility state set.
callback_scrollbars_visible_set_del
(func)¶callback_statusbar_text_set_add
(func, *args, **kwargs)¶Text of the statusbar changed. Event info is a string with the new text.
callback_statusbar_text_set_del
(func)¶callback_statusbar_visible_set_add
(func, *args, **kwargs)¶Informs statusbar visibility. Event info is a bool with the visibility value.
callback_statusbar_visible_set_del
(func)¶callback_title_changed_add
(func, *args, **kwargs)¶Title of the main frame changed. Event info is a string with the new title.
callback_title_changed_del
(func)¶callback_toolbars_visible_set_add
(func, *args, **kwargs)¶Informs the visibility of toolbars. Event info is a bool with the visibility state.
callback_toolbars_visible_set_del
(func)¶callback_tooltip_text_set_add
(func, *args, **kwargs)¶Show and set text of a tooltip. Event info is a string with the text to show.
callback_tooltip_text_set_del
(func)¶callback_unfocused_add
(func, *args, **kwargs)¶When the web has lost focus.
New in version 1.8.
callback_unfocused_del
(func)¶callback_uri_changed_add
(func, *args, **kwargs)¶URI of the main frame changed. Event info is a string. (deprecated. use “url,changed” instead)
callback_uri_changed_del
(func)¶callback_url_changed_add
(func, *args, **kwargs)¶URL of the main frame changed. Event info is a string with the new URI.
callback_url_changed_del
(func)¶callback_view_resized_add
(func, *args, **kwargs)¶The web object internal’s view changed sized.
callback_view_resized_del
(func)¶callback_windows_close_request_add
(func, *args, **kwargs)¶A JavaScript request to close the current window was requested.
callback_windows_close_request_del
(func)¶callback_zoom_animated_end_add
(func, *args, **kwargs)¶Animated zoom finished.
callback_zoom_animated_end_del
(func)¶console_message_hook_set
(func, func_data=None)¶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.
Parameters: |
|
---|
forward
()¶Goes forward one step in the browsing history
This is equivalent to calling elm_web_object_navigate(obj, 1);
Returns: | True on success, False otherwise |
---|---|
See: | elm_web_history_enabled_set() |
See: | elm_web_forward_possible_get() |
See: | elm_web_back() |
See: | elm_web_navigate() |
forward_possible
¶Queries whether it’s possible to go forward in history
Returns: | True if it’s possible to forward in history, False otherwise |
---|
history_enabled
¶Whether browsing history is enabled for the given object
Type: | bool |
---|
history_enabled_get
()¶history_enabled_set
(enabled)¶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.
Type: | 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.
Returns: | 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.
Parameters: | steps – The number of steps to jump |
---|---|
Returns: | True on success, False on error or if not enough history exists to jump the given number of steps |
See: | elm_web_history_enabled_set() |
See: | elm_web_back() |
See: | 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
Returns: | 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.
Returns: | True if the menu was successfully destroyed, or False if there was no menu to destroy |
---|
popup_selected_set
(index)¶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.
Parameters: | index – The index selected |
---|---|
See: | elm_web_popup_destroy() |
region_bring_in
(x, y, w, h)¶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
Parameters: |
|
---|
region_show
(x, y, w, h)¶Shows the given region in the web object
Parameters: |
|
---|
reload
()¶Requests a reload of the current document in the object
Returns: | True on success, False otherwise |
---|
reload_full
()¶Requests a reload of the current document, avoiding any existing caches
Returns: | 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.
Returns: | 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.
Returns: | 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.
Type: | bool |
---|
text_matches_mark
(string, case_sensitive, highlight, limit)¶Marks matches of the given string in a document.
Parameters: |
|
---|---|
Returns: | number of matched @a string |
text_matches_unmark_all
()¶Clears all marked matches in the document
Returns: | True on success, False otherwise |
---|
text_search
(string, case_sensitive, forward, wrap)¶Searches the given string in a document.
Parameters: |
|
---|---|
Returns: | 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.
Type: | string |
---|
uri
¶Deprecated since version 1.8: Use property “url” instead.
uri_get
()¶Deprecated since version 1.8: Use property url instead.
uri_set
(uri)¶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.
Type: | string |
---|---|
Raises RuntimeError: | |
if url could not be set |
New in version 1.8.
url_get
()¶url_set
(url)¶useragent
¶useragent of a elm_web object
Type: | string |
---|
useragent_get
()¶useragent_set
(user_agent)¶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.
Type: | 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.
Type: | Web zoom modes |
---|
zoom_mode_get
()¶zoom_mode_set
(mode)¶zoom_set
(zoom)¶