diff options
Diffstat (limited to 'src/xwidget.c')
| -rw-r--r-- | src/xwidget.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/xwidget.c b/src/xwidget.c index ed7ea98fb42..57d27a2b3c7 100644 --- a/src/xwidget.c +++ b/src/xwidget.c | |||
| @@ -202,7 +202,7 @@ TYPE is a symbol which can take one of the following values: | |||
| 202 | //should work a bit like "make-button"(make-button BEG END &rest PROPERTIES) | 202 | //should work a bit like "make-button"(make-button BEG END &rest PROPERTIES) |
| 203 | // arg "type" and fwd should be keyword args eventually | 203 | // arg "type" and fwd should be keyword args eventually |
| 204 | //(make-xwidget 3 3 'button "oei" 31 31 nil) | 204 | //(make-xwidget 3 3 'button "oei" 31 31 nil) |
| 205 | //(xwidget-info (car xwidget-alist)) | 205 | //(xwidget-info (car xwidget-list)) |
| 206 | struct xwidget* xw = allocate_xwidget(); | 206 | struct xwidget* xw = allocate_xwidget(); |
| 207 | Lisp_Object val; | 207 | Lisp_Object val; |
| 208 | xw->type = type; | 208 | xw->type = type; |
| @@ -1619,7 +1619,7 @@ syms_of_xwidget (void) | |||
| 1619 | 1619 | ||
| 1620 | DEFSYM (QCplist, ":plist"); | 1620 | DEFSYM (QCplist, ":plist"); |
| 1621 | 1621 | ||
| 1622 | DEFVAR_LISP ("xwidget-alist", Vxwidget_list, doc: /*xwidgets list*/); | 1622 | DEFVAR_LISP ("xwidget-list", Vxwidget_list, doc: /*xwidgets list*/); |
| 1623 | Vxwidget_list = Qnil; | 1623 | Vxwidget_list = Qnil; |
| 1624 | 1624 | ||
| 1625 | DEFVAR_LISP ("xwidget-view-alist", Vxwidget_view_alist, doc: /*xwidget views list*/); | 1625 | DEFVAR_LISP ("xwidget-view-alist", Vxwidget_view_alist, doc: /*xwidget views list*/); |
| @@ -1845,4 +1845,18 @@ xwidget_end_redisplay (struct window *w, struct glyph_matrix *matrix) | |||
| 1845 | } | 1845 | } |
| 1846 | } | 1846 | } |
| 1847 | 1847 | ||
| 1848 | /* Kill all xwidget in BUFFER. */ | ||
| 1849 | void | ||
| 1850 | kill_buffer_xwidgets (Lisp_Object buffer) | ||
| 1851 | { | ||
| 1852 | Lisp_Object tail, xw; | ||
| 1853 | |||
| 1854 | for (tail = Fget_buffer_xwidgets (buffer); CONSP (tail); tail = XCDR (tail)) | ||
| 1855 | { | ||
| 1856 | xw = XCAR (tail); | ||
| 1857 | Vxwidget_list = Fdelq (xw, Vxwidget_list); | ||
| 1858 | /* TODO free the GTK things in xw */ | ||
| 1859 | } | ||
| 1860 | } | ||
| 1861 | |||
| 1848 | #endif /* HAVE_XWIDGETS */ | 1862 | #endif /* HAVE_XWIDGETS */ |