Lisp_Object title, Lisp_Object width, Lisp_Object height, Lisp_Object arguments, Lisp_Object buffer) { CHECK_SYMBOL (type); CHECK_NATNUM (width); 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 (); Lisp_Object val; xw->type = type; xw->title = title; xw->buffer = NILP (buffer) ? Fcurrent_buffer () : Fget_buffer_create (buffer); xw->height = XFASTINT (height); xw->width = XFASTINT (width); xw->kill_without_query = false; XSETXWIDGET (val, xw); Vxwidget_list = Fcons (val, Vxwidget_list); xw->widgetwindow_osr = NULL; xw->widget_osr = NULL; xw->plist = Qnil; if (EQ (xw->type, Qwebkit_osr)) { block_input (); xw->widgetwindow_osr = gtk_offscreen_window_new (); gtk_window_resize (GTK_WINDOW (xw->widgetwindow_osr), xw->width, xw->height);
Lisp_Object title, Lisp_Object width, Lisp_Object height, Lisp_Object data) { //should work a bit like "make-button"(make-button BEG END &rest PROPERTIES) // arg "type" and fwd should be keyword args eventually //(make-xwidget 3 3 'button "oei" 31 31 nil) //(xwidget-info (car xwidget-alist)) struct xwidget* xw = allocate_xwidget(); Lisp_Object val; struct gcpro gcpro1; GCPRO1(xw); XSETSYMBOL(xw->type, type); XSETSTRING(xw->title, title); //TODO buffer should be an optional argument not just assumed to be the current buffer XSETBUFFER(xw->buffer, Fcurrent_buffer()); // conservatively gcpro xw since we call lisp xw->height = XFASTINT(height); xw->width = XFASTINT(width); XSETPSEUDOVECTOR (val, xw, PVEC_XWIDGET); //?? dunno why i need this Vxwidget_alist = Fcons ( val, Vxwidget_alist); xw->widgetwindow_osr = NULL; xw->widget_osr = NULL; xw->plist = Qnil; #ifdef HAVE_WEBKIT_OSR /* DIY mvc. widget is rendered offscreen, later bitmap copied to the views. */ if (EQ(xw->type, Qwebkit_osr)){ printf("init webkit osr\n");