Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
5627:37fb945697f5 | 5628:81fee4aee9b6 |
---|---|
637 find_charsets_in_ichar_string (charsets, str, len); | 637 find_charsets_in_ichar_string (charsets, str, len); |
638 window = wrap_window (w); | 638 window = wrap_window (w); |
639 ensure_face_cachel_complete (WINDOW_FACE_CACHEL (w, findex), window, | 639 ensure_face_cachel_complete (WINDOW_FACE_CACHEL (w, findex), window, |
640 charsets); | 640 charsets); |
641 return DEVMETH (WINDOW_XDEVICE (w), | 641 return DEVMETH (WINDOW_XDEVICE (w), |
642 text_width, (w, WINDOW_FACE_CACHEL (w, findex), str, | 642 text_width, (WINDOW_XFRAME (w), |
643 WINDOW_FACE_CACHEL (w, findex), str, | |
643 len)); | 644 len)); |
644 } | 645 } |
645 | 646 |
646 static Ichar_dynarr *rtw_ichar_dynarr; | 647 static Ichar_dynarr *rtw_ichar_dynarr; |
647 | 648 |
685 reset_face_cachel (&cachel); | 686 reset_face_cachel (&cachel); |
686 cachel.face = face; | 687 cachel.face = face; |
687 ensure_face_cachel_complete (&cachel, | 688 ensure_face_cachel_complete (&cachel, |
688 NILP (window) ? frame : window, | 689 NILP (window) ? frame : window, |
689 charsets); | 690 charsets); |
690 return DEVMETH (XDEVICE (FRAME_DEVICE (XFRAME (frame))), | 691 return DEVMETH (FRAME_XDEVICE (XFRAME (frame)), |
691 /* #### Not clear if we're always passed a window, but | 692 text_width, (XFRAME (frame), |
692 I think so. If not, we will get an abort here, | |
693 and then we need to either fix the callers to pass in | |
694 a window, or change *text_width() to take a domain | |
695 argument. */ | |
696 text_width, (XWINDOW (window), | |
697 &cachel, | 693 &cachel, |
698 Dynarr_begin (rtw_ichar_dynarr), | 694 Dynarr_begin (rtw_ichar_dynarr), |
699 Dynarr_length (rtw_ichar_dynarr))); | 695 Dynarr_length (rtw_ichar_dynarr))); |
700 } | 696 } |
701 | 697 |