Note! The EZ_Webbrowser is a thin wrapper around a native pywebkitgtk object.
We have found that the native pywebkitgtk object may be difficult for beginners to use, so we have wrapped it with a set of simpler function calls.
Advanced users who wish to use pywebkitgtk directly can import pygtk, gtk, and webkit to directly access pywebkitgtk.
More information about pywebkitgtk can be found at the official pywebkitgtk website
Webbrowser Object Creation Function
Creates the webbrowser component at the specified location.
Returns a webbrowser object
Webbrowser Object General Functions
Navigates the webbrowser to the previous page in the history stack.
This is equivilant to pressing the back button in a browser.
Navigates the webbrowser to the next page in the history stack.
This is equivilant to pressing the forward button in a browser.
Hides the webbrowser.
To restore a hidden webbrowser, use the show function.
Renders the html passed in through the
Moves the webbrowser to a new location on the screen.
Navigates the webbrowser to a new
Reloads the current page in the webbrowser.
Scroll the webbpage so that the html element identified by
Currently, this function can only be used with the an element_uid returned by an on_input_tag_clicked event.
and then scrolled down so that the top of the html element was 50 pixels further down the web page.
Restores the webbrowser that was previously hidden by a call to webbrowser_hide.
Zooms the page being displayed in the webbrowser by the level specified by the
Webbrowser Object Pointer and Keyboard Functions
Sends a click event to the webbrowser at the location of the current pointer.
Hides the pointer used by the webbrowser.
To restore a hidden pointer, use the pointer_show function.
Moves the webbrowser pointer.
Sets the offset of the webbrowser pointer relative to the touchscreen point where the user's finger is at.
It can be useful to set the pointer 50 pixels to the left of the actual touchscreen point so that the user can
see with great precision exactly where the pointer is.
This offset is only applied by the process_touch function.
Restores the webbrowser pointer that was previously hidden by a call to pointer_hide.
Converts points returned by the ez_touchscreen touchscreen_finger_point() function to webbrowser pointer moves and clicks.
Sends a character to the web browser as if it was sent by the keyboard.
Use '\r' for return and '\b' for backspace.
Webbrowser Object Scrolling Functions
Returns the current value of the horizontal scroll bar of the webbrowser.
Returns the maximum value of the horizontal scroll bar of the webbrowser.
Returns the current value of the vertical scroll bar of the webbrowser.
Returns the maximum value of the vertical scroll bar of the webbrowser.
Sets the new value of the horizontal scroll bar of the webbrowser
Sets the new value of the vertical scroll bar of the webbrowser
Webbrowser Object Events
This event is called when the webbrowser pointer clicks on an input tag so that an application can display an on screen keyboard.
Generally in order to accomodate an on screen keyboard, the webbrowser will need to be resized with the move function,
then the scroll_html_element_into_view function will be called with the
the input tag into view since the webbrowser has been resized, possibly causing the input tag which the user clicked on
to no longer be visible. Finally an onscreen keyboard such as an UI_MiniKeyboard can be displayed allowing the user to enter in text.
The individual keys that are clicked on the onscreen keyboard should be passed to the webbrowser using the send_keys function.
This event is called when the progress of a load changes.
This event is called before the webbrowser attempts to navigate to a new URL.
Return True to block the navigation, return False to allow the navigation.
An example is intercepting blacklisted URLs in this event and then using the load_html_string function
to display an HTML message saying that this web page has been blocked.