elisp: Xwidgets

 
 37.18 Embedded Native Widgets
 =============================
 
 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 (SeeNamed 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 (SeeDisplay Property).
 
  -- Function: make-xwidget type title width height arguments &optional
           buffer
      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.
 
  -- Function: xwidgetp object
      This function returns ‘t’ if OBJECT is an xwidget, ‘nil’ otherwise.
 
  -- Function: xwidget-plist xwidget
      This function returns the property list of XWIDGET.
 
  -- Function: set-xwidget-plist xwidget plist
      This function replaces the property list of XWIDGET with a new
      property list given by PLIST.
 
  -- Function: xwidget-buffer xwidget
      This function returns the buffer of XWIDGET.
 
  -- Function: get-buffer-xwidgets buffer
      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.
 
  -- Function: xwidget-webkit-goto-uri xwidget uri
      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.
 
  -- Function: xwidget-webkit-execute-script xwidget script
      This function causes the browser widget specified by XWIDGET to
      execute the specified JavaScript ‘script’.
 
  -- Function: xwidget-webkit-execute-script-rv xwidget script &optional
           default
      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, or ‘nil’ if DEFAULT was
      omitted.
 
  -- Function: xwidget-webkit-get-title xwidget
      This function returns the title of XWIDGET as a string.
 
  -- Function: xwidget-resize xwidget width height
      This function resizes the specified XWIDGET to the size
      WIDTHxHEIGHT pixels.
 
  -- Function: xwidget-size-request xwidget
      This function returns the desired size of XWIDGET as a list of the
      form ‘(WIDTH HEIGHT)’.  The dimensions are in pixels.
 
  -- Function: xwidget-info xwidget
      This function returns the attributes of XWIDGET as a vector of the
      form ‘[TYPE TITLE WIDTH HEIGHT]’.  The attributes are usually
      determined by ‘make-xwidget’ when the xwidget is created.
 
  -- Function: set-xwidget-query-on-exit-flag xwidget flag
      This function allows you to arrange that Emacs will ask the user
      for confirmation before exiting or before killing a buffer that has
      XWIDGET associated with it.  If FLAG is non-‘nil’, Emacs will query
      the user, otherwise it will not.
 
  -- Function: xwidget-query-on-exit-flag xwidget
      This function returns the current setting of XWIDGETs query-on-exit
      flag, either ‘t’ or ‘nil’.