Fmake_xwidget, Smake_xwidget,
7, 8, 0,
doc: /* Make an xwidget from BEG to END of TYPE.
-
-If BUFFER is nil it uses the current
-buffer. If BUFFER is a string and no such
-buffer exists, it is created.
-
-TYPE is a symbol which can take one of the
-following values:
+If BUFFER is nil, use the current buffer.
+If BUFFER is a string and no such buffer exists, create it.
+TYPE is a symbol which can take one of the following values:
- webkit_osr
-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 title,
gtk_widget_show (xw->widgetscrolledwindow_osr);
/* store some xwidget data in the gtk widgets for convenient
- retrieval in the event handlers. */
+ retrieval in the event handlers. */
g_object_set_data (G_OBJECT (xw->widget_osr), XG_XWIDGET,
(gpointer) (xw));
g_object_set_data (G_OBJECT (xw->widgetwindow_osr), XG_XWIDGET,
DEFUN ("get-buffer-xwidgets", Fget_buffer_xwidgets, Sget_buffer_xwidgets,
1, 1, 0,
doc: /* Return a list of xwidgets associated with BUFFER.
-BUFFER may be a buffer or the name of one. */)
+BUFFER may be a buffer or the name of one. */)
(Lisp_Object buffer)
{
Lisp_Object xw, tail, xw_list;
gpointer user_data)
{
// This function makes webkit send a download signal for all unknown
- // mime types. TODO Defer the decision to lisp, so that its possible
+ // mime types. TODO Defer the decision to lisp, so that its possible
// to make Emacs handle teext mime for instance.xs
if (!webkit_web_view_can_show_mime_type (webView, mimetype))
{
GdkEvent * event,
gpointer user_data)
{
- /* Copy events that arrive at the outer widget to the offscreen widget. */
+ /* Copy events that arrive at the outer widget to the offscreen widget. */
struct xwidget *xw =
(struct xwidget *) g_object_get_data (G_OBJECT (widget), XG_XWIDGET);
GdkEvent *eventcopy = gdk_event_copy (event);
eventcopy->any.window = gtk_widget_get_window (xw->widget_osr);
- //TODO This might leak events. They should be deallocated later,
+ //TODO This might leak events. They should be deallocated later,
//perhaps in xwgir_event_cb
gtk_main_do_event (eventcopy);
return TRUE; //dont propagate this event furter
}
-/* Initializes and does initial placement of an xwidget view on screen. */
+/* Initializes and does initial placement of an xwidget view on screen. */
static struct xwidget_view *
xwidget_init_view (struct xwidget *xww,
struct glyph_string *s,
WINDOW_BOTTOM_EDGE_Y (s->w) - WINDOW_MODE_LINE_HEIGHT (s->w) - y);
clip_top = max (0, WINDOW_TOP_EDGE_Y (s->w) - y);
- // We are conserned with movement of the onscreen area. The area
+ // We are conserned with movement of the onscreen area. The area
// might sit still when the widget actually moves. This happens
- // when an Emacs window border moves across a widget window. So, if
+ // when an Emacs window border moves across a widget window. So, if
// any corner of the outer widget clipping window moves, that counts
// as movement here, even if it looks like no movement happens
// because the widget sits still inside the clipping area. The
xv->widgetwindow, x + clip_left, y + clip_top);
}
// Clip the widget window if some parts happen to be outside
- // drawable area. An Emacs window is not a gtk window. A gtk window
- // covers the entire frame. Clipping might have changed even if we
+ // drawable area. An Emacs window is not a gtk window. A gtk window
+ // covers the entire frame. Clipping might have changed even if we
// havent actualy moved, we try figure out when we need to reclip
// for real.
if ((xv->clip_right != clip_right)
xv->clip_left = clip_left;
}
// If emacs wants to repaint the area where the widget lives, queue
- // a redraw. It seems its possible to get out of sync with emacs
+ // a redraw. It seems its possible to get out of sync with emacs
// redraws so emacs background sometimes shows up instead of the
- // xwidgets background. It's just a visual glitch though.
+ // xwidgets background. It's just a visual glitch though.
if (!xwidget_hidden (xv))
{
gtk_widget_queue_draw (xv->widgetwindow);
DEFUN ("xwidget-webkit-goto-uri",
Fxwidget_webkit_goto_uri, Sxwidget_webkit_goto_uri,
2, 2, 0,
- doc: /* Make the xwidget webkit instance referenced by XWIDGET
-browse URI. */)
+ doc: /* Make the xwidget webkit instance referenced by XWIDGET browse URI. */)
(Lisp_Object xwidget, Lisp_Object uri)
{
WEBKIT_FN_INIT ();
DEFUN ("xwidget-webkit-get-title",
Fxwidget_webkit_get_title, Sxwidget_webkit_get_title,
1, 1, 0,
- doc: /* Returns the title from the Webkit instance in XWIDGET.
+ doc: /* Return the title from the Webkit instance in XWIDGET.
This can be used to work around the lack of a return value from the
exec method. */ )
(Lisp_Object xwidget)
webkit_web_view_get_title (WEBKIT_WEB_VIEW (xw->widget_osr));
if (str == 0)
{
- // TODO maybe return Qnil instead. I suppose webkit returns
+ // TODO maybe return Qnil instead. I suppose webkit returns
// nullpointer when doc is not properly loaded or something
return build_string ("");
}
}
DEFUN ("xwidget-resize", Fxwidget_resize, Sxwidget_resize, 3, 3, 0,
- doc: /* Resize XWIDGET. NEW_WIDTH NEW_HEIGHT defines the new
-size. */ )
+ doc: /* Resize XWIDGET. NEW_WIDTH, NEW_HEIGHT define the new size. */ )
(Lisp_Object xwidget, Lisp_Object new_width, Lisp_Object new_height)
{
CHECK_XWIDGET (xwidget);
DEFUN ("xwidget-set-adjustment",
Fxwidget_set_adjustment, Sxwidget_set_adjustment, 4, 4, 0,
- doc: /* Set native scrolling for XWIDGET. AXIS can be 'vertical or
-'horizontal. If RELATIVE is t, scroll relative, otherwise absolutely.
+ doc: /* Set native scrolling for XWIDGET.
+AXIS can be 'vertical or 'horizontal.
+If RELATIVE is t, scroll relative, otherwise absolutely.
VALUE is the amount to scroll, either relatively or absolutely. */)
(Lisp_Object xwidget, Lisp_Object axis, Lisp_Object relative,
Lisp_Object value)
Fxwidget_size_request, Sxwidget_size_request,
1, 1, 0,
doc: /* Return the desired size of the XWIDGET.
-
This can be used to read the xwidget desired size, and resizes the
Emacs allocated area accordingly. */)
(Lisp_Object xwidget)
DEFUN ("xwidgetp",
Fxwidgetp, Sxwidgetp,
1, 1, 0,
- doc: /* Return t if OBJECT is a xwidget. */)
+ doc: /* Return t if OBJECT is an xwidget. */)
(Lisp_Object object)
{
return XWIDGETP (object) ? Qt : Qnil;
DEFUN ("xwidget-view-p",
Fxwidget_view_p, Sxwidget_view_p,
1, 1, 0,
- doc: /* Return t if OBJECT is a xwidget-view. */)
+ doc: /* Return t if OBJECT is an xwidget-view. */)
(Lisp_Object object)
{
return XWIDGET_VIEW_P (object) ? Qt : Qnil;
DEFUN ("xwidget-info",
Fxwidget_info, Sxwidget_info,
1, 1, 0,
- doc: /* Return XWIDGET properties in a vector. Currently [TYPE
-TITLE WIDTH HEIGHT]. */)
+ doc: /* Return XWIDGET properties in a vector.
+Currently [TYPE TITLE WIDTH HEIGHT]. */)
(Lisp_Object xwidget)
{
CHECK_XWIDGET (xwidget);
Fxwidget_view_info, Sxwidget_view_info,
1, 1, 0,
doc: /* Return properties of XWIDGET-VIEW in a vector.
-Currently [X Y CLIP_RIGHT CLIP_BOTTOM CLIP_TOP CLIP_LEFT] */)
+Currently [X Y CLIP_RIGHT CLIP_BOTTOM CLIP_TOP CLIP_LEFT]. */)
(Lisp_Object xwidget_view)
{
CHECK_XWIDGET_VIEW (xwidget_view);
DEFUN ("xwidget-view-model",
Fxwidget_view_model, Sxwidget_view_model,
1, 1, 0,
- doc: /* Return the model associated with XWIDGET-VIEW. */)
+ doc: /* Return the model associated with XWIDGET-VIEW. */)
(Lisp_Object xwidget_view)
{
CHECK_XWIDGET_VIEW (xwidget_view);
DEFUN ("xwidget-view-window",
Fxwidget_view_window, Sxwidget_view_window,
1, 1, 0,
- doc: /* Return the window of XWIDGET-VIEW. */)
+ doc: /* Return the window of XWIDGET-VIEW. */)
(Lisp_Object xwidget_view)
{
CHECK_XWIDGET_VIEW (xwidget_view);
DEFUN ("delete-xwidget-view",
Fdelete_xwidget_view, Sdelete_xwidget_view,
1, 1, 0,
- doc: /* Delete the XWIDGET-VIEW. */)
+ doc: /* Delete the XWIDGET-VIEW. */)
(Lisp_Object xwidget_view)
{
CHECK_XWIDGET_VIEW (xwidget_view);
struct xwidget_view *xv = XXWIDGET_VIEW (xwidget_view);
gtk_widget_destroy (xv->widgetwindow);
Vxwidget_view_list = Fdelq (xwidget_view, Vxwidget_view_list);
- // xv->model still has signals pointing to the view. There can be
- // several views. Find the matching signals and delete them all.
+ // xv->model still has signals pointing to the view. There can be
+ // several views. Find the matching signals and delete them all.
g_signal_handlers_disconnect_matched (XXWIDGET (xv->model)->widgetwindow_osr,
G_SIGNAL_MATCH_DATA,
0, 0, 0, 0,
DEFUN ("xwidget-view-lookup",
Fxwidget_view_lookup, Sxwidget_view_lookup,
1, 2, 0,
- doc: /* Return the xwidget-view associated with XWIDGET in
-WINDOW if specified, otherwise it uses the selected window. Return nil
-if no association is found. */)
+ doc: /* Return the xwidget-view associated with XWIDGET in WINDOW.
+If WINDOW is unspecified or nil, use the selected window.
+Return nil if no association is found. */)
(Lisp_Object xwidget, Lisp_Object window)
{
CHECK_XWIDGET (xwidget);
DEFUN ("set-xwidget-query-on-exit-flag",
Fset_xwidget_query_on_exit_flag, Sset_xwidget_query_on_exit_flag,
2, 2, 0,
- doc: /* Specify if query is needed for XWIDGET when
-Emacs is exited. If the second argument FLAG is non-nil, Emacs will
-queries the user before exiting or killing a buffer if XWIDGET is
-running. This function returns FLAG. */)
+ doc: /* Specify if query is needed for XWIDGET when Emacs is exited.
+If the second argument FLAG is non-nil, Emacs will query the user before
+exiting or killing a buffer if XWIDGET is running.
+This function returns FLAG. */)
(Lisp_Object xwidget, Lisp_Object flag)
{
CHECK_XWIDGET (xwidget);
DEFUN ("xwidget-query-on-exit-flag",
Fxwidget_query_on_exit_flag, Sxwidget_query_on_exit_flag,
1, 1, 0,
- doc: /* Return the current value of query-on-exit
-flag for XWIDGET. */)
+ doc: /* Return the current value of the query-on-exit flag for XWIDGET. */)
(Lisp_Object xwidget)
{
CHECK_XWIDGET (xwidget);
DEFSYM (QCtitle, ":title");
/* Do not forget to update the docstring of make-xwidget if you add
- new types. */
+ new types. */
DEFSYM (Qvertical, "vertical");
DEFSYM (Qhorizontal, "horizontal");
return xw;
}
-/* Set up detection of touched xwidget*/
+/* Set up detection of touched xwidget */
void
xwidget_start_redisplay (void)
{
// Iterate desired glyph matrix of window here, hide gtk widgets
// not in the desired matrix.
- // This only takes care of xwidgets in active windows. if a window
+ // This only takes care of xwidgets in active windows. If a window
// goes away from screen xwidget views wust be deleted
// dump_glyph_matrix (matrix, 2);
}
}
-/* Kill all xwidget in BUFFER. */
+/* Kill all xwidget in BUFFER. */
void
kill_buffer_xwidgets (Lisp_Object buffer)
{