Emacs is able to display native widgets, such as GTK+ WebKit widgets,
in Emacs buffers when it was built with the necessary support
libraries and is running on a graphical terminal. To test whether
Emacs supports display of embedded widgets, check that the
xwidget-internal
feature is available (see Named Features).
To display an embedded widget in a buffer, you must first create an
xwidget object, and then use that object as the display specifier
in a display
text or overlay property (see Display Property).
This creates and returns an xwidget object. If buffer is omitted or
nil
, it defaults to the current buffer. If buffer names a buffer that doesn't exist, it will be created. The type identifies the type of the xwidget component, it can be one of the following:
webkit
- The WebKit component.
The width and height arguments specify the widget size in pixels, and title, a string, specifies its title.
This function replaces the property list of xwidget with a new property list given by plist.
This function returns a list of xwidget objects associated with the buffer, which can be specified as a buffer object or a name of an existing buffer, a string. The value is
nil
if buffer contains no xwidgets.
This function browses the specified uri in the given xwidget. The uri is a string that specifies the name of a file or a URL.
This function causes the browser widget specified by xwidget to execute the specified JavaScript
script
.
This function executes the specified script like
xwidget-webkit-execute-script
does, but it also returns the script's return value as a string. If script doesn't return a value, this function returns default, ornil
if default was omitted.
This function returns the title of xwidget as a string.
This function resizes the specified xwidget to the size widthxheight pixels.
This function returns the desired size of xwidget as a list of the form
(
width height)
. The dimensions are in pixels.
This function returns the attributes of xwidget as a vector of the form
[
type title width height]
. The attributes are usually determined bymake-xwidget
when the xwidget is created.