Remove unused arguments from make-xwidget
The arguments BEG and END were unused, and are now removed. * display.texi (Xwidgets): Document the change * xwidget.el (make-xwidget, xwidget-insert) (xwidget-webkit-new-session): Reflect changed arguments * xwidget.c (Fmake_xwidget, syms_of_xwidget): Reflect changed arguments
This commit is contained in:
parent
104221731e
commit
36e05f0bf7
3 changed files with 12 additions and 17 deletions
|
@ -5641,7 +5641,7 @@ xwidget object, and then use that object as the display specifier
|
||||||
in a @code{display} text or overlay property (@pxref{Display
|
in a @code{display} text or overlay property (@pxref{Display
|
||||||
Property}).
|
Property}).
|
||||||
|
|
||||||
@defun make-xwidget beg end type title width height arguments &optional buffer
|
@defun make-xwidget type title width height arguments &optional buffer
|
||||||
This creates an xwidget object between @var{beg} and @var{end}, buffer
|
This creates an xwidget object between @var{beg} and @var{end}, buffer
|
||||||
positions in @var{buffer}, and returns the new object. If
|
positions in @var{buffer}, and returns the new object. If
|
||||||
@var{buffer} is omitted or @code{nil}, it defaults to the current
|
@var{buffer} is omitted or @code{nil}, it defaults to the current
|
||||||
|
@ -5650,8 +5650,8 @@ created. The @var{type} identifies the type of the xwidget component,
|
||||||
it can be one of the following:
|
it can be one of the following:
|
||||||
|
|
||||||
@table @code
|
@table @code
|
||||||
@item webkit-osr
|
@item webkit
|
||||||
The WebKit OSR (@dfn{on-stack replacement}) component.
|
The WebKit (@dfn{on-stack replacement}) component.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
The @var{width} and @var{height} arguments specify the widget size in
|
The @var{width} and @var{height} arguments specify the widget size in
|
||||||
|
|
|
@ -42,7 +42,7 @@ The possible values are: `native' or `image'."
|
||||||
:type '(choice (const native) (const image)))
|
:type '(choice (const native) (const image)))
|
||||||
|
|
||||||
(declare-function make-xwidget "xwidget.c"
|
(declare-function make-xwidget "xwidget.c"
|
||||||
(beg end type title width height arguments &optional buffer))
|
(type title width height arguments &optional buffer))
|
||||||
(declare-function xwidget-set-adjustment "xwidget.c"
|
(declare-function xwidget-set-adjustment "xwidget.c"
|
||||||
(xwidget axis relative value))
|
(xwidget axis relative value))
|
||||||
(declare-function xwidget-buffer "xwidget.c" (xwidget))
|
(declare-function xwidget-buffer "xwidget.c" (xwidget))
|
||||||
|
@ -66,8 +66,7 @@ See `make-xwidget' for the possible TYPE values.
|
||||||
The usage of optional argument ARGS depends on the xwidget.
|
The usage of optional argument ARGS depends on the xwidget.
|
||||||
This returns the result of `make-xwidget'."
|
This returns the result of `make-xwidget'."
|
||||||
(goto-char pos)
|
(goto-char pos)
|
||||||
(let ((id (make-xwidget (point) (point)
|
(let ((id (make-xwidget type title width height args)))
|
||||||
type title width height args)))
|
|
||||||
(put-text-property (point) (+ 1 (point))
|
(put-text-property (point) (+ 1 (point))
|
||||||
'display (list 'xwidget ':xwidget id))
|
'display (list 'xwidget ':xwidget id))
|
||||||
id))
|
id))
|
||||||
|
@ -454,7 +453,7 @@ For example, use this to display an anchor."
|
||||||
(setq xwidget-webkit-last-session-buffer (switch-to-buffer
|
(setq xwidget-webkit-last-session-buffer (switch-to-buffer
|
||||||
(get-buffer-create bufname)))
|
(get-buffer-create bufname)))
|
||||||
(insert " 'a' adjusts the xwidget size.")
|
(insert " 'a' adjusts the xwidget size.")
|
||||||
(setq xw (xwidget-insert 1 'webkit-osr bufname 1000 1000))
|
(setq xw (xwidget-insert 1 'webkit bufname 1000 1000))
|
||||||
(xwidget-put xw 'callback 'xwidget-webkit-callback)
|
(xwidget-put xw 'callback 'xwidget-webkit-callback)
|
||||||
(xwidget-webkit-mode)
|
(xwidget-webkit-mode)
|
||||||
(xwidget-webkit-goto-uri (xwidget-webkit-last-session) url)))
|
(xwidget-webkit-goto-uri (xwidget-webkit-last-session) url)))
|
||||||
|
|
|
@ -156,27 +156,23 @@ webkit_navigation_policy_decision_requested_cb (WebKitWebView *,
|
||||||
|
|
||||||
DEFUN ("make-xwidget",
|
DEFUN ("make-xwidget",
|
||||||
Fmake_xwidget, Smake_xwidget,
|
Fmake_xwidget, Smake_xwidget,
|
||||||
7, 8, 0,
|
5, 6, 0,
|
||||||
doc: /* Make an xwidget from BEG to END of TYPE.
|
doc: /* Make an xwidget of TYPE.
|
||||||
If BUFFER is nil, use the current buffer.
|
If BUFFER is nil, use the current buffer.
|
||||||
If BUFFER is a string and no such buffer exists, create it.
|
If BUFFER is a string and no such buffer exists, create it.
|
||||||
TYPE is a symbol which can take one of the following values:
|
TYPE is a symbol which can take one of the following values:
|
||||||
|
|
||||||
- webkit-osr
|
- webkit
|
||||||
|
|
||||||
Returns the newly constructed xwidget, or nil if construction fails. */)
|
Returns the newly constructed xwidget, or nil if construction fails. */)
|
||||||
(Lisp_Object beg, Lisp_Object end, Lisp_Object type,
|
(Lisp_Object type,
|
||||||
Lisp_Object title, Lisp_Object width, Lisp_Object height,
|
Lisp_Object title, Lisp_Object width, Lisp_Object height,
|
||||||
Lisp_Object arguments, Lisp_Object buffer)
|
Lisp_Object arguments, Lisp_Object buffer)
|
||||||
{
|
{
|
||||||
CHECK_SYMBOL (type);
|
CHECK_SYMBOL (type);
|
||||||
CHECK_NATNUM (width);
|
CHECK_NATNUM (width);
|
||||||
CHECK_NATNUM (height);
|
CHECK_NATNUM (height);
|
||||||
/* This should work a bit like "make-button"
|
|
||||||
(make-button BEG END &rest PROPERTIES)
|
|
||||||
TYPE etc. should be keyword args eventually.
|
|
||||||
(make-xwidget 3 3 'button "oei" 31 31 nil)
|
|
||||||
(xwidget-info (car xwidget-list)) */
|
|
||||||
struct xwidget *xw = allocate_xwidget ();
|
struct xwidget *xw = allocate_xwidget ();
|
||||||
Lisp_Object val;
|
Lisp_Object val;
|
||||||
xw->type = type;
|
xw->type = type;
|
||||||
|
@ -987,7 +983,7 @@ syms_of_xwidget (void)
|
||||||
defsubr (&Sxwidget_webkit_goto_uri);
|
defsubr (&Sxwidget_webkit_goto_uri);
|
||||||
defsubr (&Sxwidget_webkit_execute_script);
|
defsubr (&Sxwidget_webkit_execute_script);
|
||||||
defsubr (&Sxwidget_webkit_get_title);
|
defsubr (&Sxwidget_webkit_get_title);
|
||||||
DEFSYM (Qwebkit_osr, "webkit-osr");
|
DEFSYM (Qwebkit_osr, "webkit");
|
||||||
|
|
||||||
defsubr (&Sxwidget_size_request);
|
defsubr (&Sxwidget_size_request);
|
||||||
defsubr (&Sdelete_xwidget_view);
|
defsubr (&Sdelete_xwidget_view);
|
||||||
|
|
Loading…
Add table
Reference in a new issue