diff src/redisplay.c @ 5628:81fee4aee9b6

text_width methods interface cleanup. -------------------- ChangeLog entries follow: -------------------- src/ChangeLog addition: 2011-12-28 Didier Verna <didier@xemacs.org> * console-impl.h (struct console_methods): Have the text_width methods expect a frame instead of a window pointer. * console-stream.c (stream_text_width): * redisplay-msw.c (mswindows_text_width): * redisplay-tty.c (tty_text_width): * redisplay-xlike-inc.c (XLIKE_text_width): Update accordingly. * redisplay-msw.c (mswindows_output_string): * redisplay-xlike-inc.c (XLIKE_output_string): * redisplay.c (redisplay_window_text_width_ichar_string): * redisplay.c (redisplay_text_width_string): Update the callers. This also fixes an uncertainty about always getting a window from a domain.
author Didier Verna <didier@xemacs.org>
date Wed, 28 Dec 2011 11:21:38 +0100
parents 75ad4969a16d
children b6c506c30f93
line wrap: on
line diff
--- a/src/redisplay.c	Wed Dec 28 10:53:38 2011 +0100
+++ b/src/redisplay.c	Wed Dec 28 11:21:38 2011 +0100
@@ -639,7 +639,8 @@
   ensure_face_cachel_complete (WINDOW_FACE_CACHEL (w, findex), window,
 			       charsets);
   return DEVMETH (WINDOW_XDEVICE (w),
-		  text_width, (w, WINDOW_FACE_CACHEL (w, findex), str,
+		  text_width, (WINDOW_XFRAME (w),
+			       WINDOW_FACE_CACHEL (w, findex), str,
 			       len));
 }
 
@@ -687,13 +688,8 @@
   ensure_face_cachel_complete (&cachel,
 			       NILP (window) ? frame : window,
 			       charsets);
-  return DEVMETH (XDEVICE (FRAME_DEVICE (XFRAME (frame))),
-		  /* #### Not clear if we're always passed a window, but
-		     I think so.  If not, we will get an abort here,
-		     and then we need to either fix the callers to pass in
-		     a window, or change *text_width() to take a domain
-		     argument. */
-		  text_width, (XWINDOW (window),
+  return DEVMETH (FRAME_XDEVICE (XFRAME (frame)),
+		  text_width, (XFRAME (frame),
 			       &cachel,
 			       Dynarr_begin (rtw_ichar_dynarr),
 			       Dynarr_length (rtw_ichar_dynarr)));